

プログラミング初心者かつ、初質問です。  
Pythonでプログラムを書いたところ、`import torch` の行でエラーになり、`pip install torch`
を行おうとするとエラーになります。virtualenv などのアンインストールを行いましたが治りませんでした。以下、エラー文です。

[code]

    pip install torch torchvision
    Defaulting to user installation because normal site-packages is not writeable
    Collecting torch
      Using cached torch-0.1.2.post2.tar.gz (128 kB)
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3xdeqzsh/torch/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3xdeqzsh/torch/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9sdh6knp
             cwd: /tmp/pip-install-3xdeqzsh/torch/
        Complete output (8 lines):
        running egg_info
        creating /tmp/pip-pip-egg-info-9sdh6knp/torch.egg-info
        writing /tmp/pip-pip-egg-info-9sdh6knp/torch.egg-info/PKG-INFO
        writing dependency_links to /tmp/pip-pip-egg-info-9sdh6knp/torch.egg-info/dependency_links.txt
        writing requirements to /tmp/pip-pip-egg-info-9sdh6knp/torch.egg-info/requires.txt
        writing top-level names to /tmp/pip-pip-egg-info-9sdh6knp/torch.egg-info/top_level.txt
        writing manifest file '/tmp/pip-pip-egg-info-9sdh6knp/torch.egg-info/SOURCES.txt'
        error: package directory 'torch/cuda' does not exist
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    
[/code]


CC BY-SA 4.0
2020-11-02T08:29:55.343
71665
2020-11-02T08:32:41.893
2020-11-02T08:32:41.893
3060
42569
question
python pip pytorch
pip install torch がエラーになる