【问题标题】:Error in pip install torchvision on Windows 10Windows 10 上的 pip install torchvision 错误
【发布时间】:2018-11-21 14:18:02
【问题描述】:

pytorch 上,安装在 Windows 10、conda 和 Cuda 9.0 上。

当我运行 conda install pytorch cuda90 -c pytorch 时,cmd 没有抱怨,然后当我运行 pip3 install torchvision 时,我收到了这个错误消息。

Requirement already satisfied: torchvision in PATHTOFILE\python35\lib\site-packages (0.2.1)
Requirement already satisfied: numpy in PATHTOFILE\python35\lib\site-packages (from torchvision) (1.12.0+mkl)
Requirement already satisfied: six in PATHTOFILE\python35\lib\site-packages (from torchvision) (1.10.0)
Collecting pillow>=4.1.1 (from torchvision)
  Using cached https://files.pythonhosted.org/packages/ab/d2/d27a21bd3e64db1ca1dc7dc16026a16d77f5c3ffca9ec619eddeea7c47ce/Pillow-5.1.0-cp35-cp35m-win_amd64.whl
Collecting torch (from torchvision)
  Using cached https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\USERNAME~1\AppData\Local\Temp\pip-install-a70g611u\torch\setup.py", line 11, in <module>
        raise RuntimeError(README)
    RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).

    Please follow the instructions at http://pytorch.org/ to install with miniconda instead.


    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USERNAME~1\AppData\Local\Temp\pip-install-a70g611u\torch\

有人遇到这个错误吗?

【问题讨论】:

    标签: python python-3.x pytorch


    【解决方案1】:

    对我来说,使用“pip install --no-deps torchvision”效果很好。

    【讨论】:

      【解决方案2】:

      由于大小限制,Windows 版本的 pytorch 从未上传到 PyPi for Windows。所以安装时需要使用 -f 或 --force-link 到 PyTorch 轮:

      pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
      
      

      【讨论】:

        【解决方案3】:

        我尝试使用:

        pip install torchvision
        

        但这对我不起作用。 所以,我更仔细地搜索了这个问题,并找到了另一种解决方案:

        pip install --no-deps torchvision
        

        希望对你有所帮助。

        更新: 我要补充:“--no-deps”表示不会下载任何依赖包。

        【讨论】:

          【解决方案4】:

          通过运行以下修复它

          pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp35-cp35m-win_amd64.whl

          pip3 install torchvision

          这奇怪地解决了问题。不知道为什么。下次尝试在pip上运行所有内容

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2018-08-25
            • 1970-01-01
            • 2019-12-27
            • 1970-01-01
            • 2015-07-21
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多