Anaconda下的Pytorch安装问题 [英] Pytorch installation issue under Anaconda

查看:278
本文介绍了Anaconda下的Pytorch安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照此处的链接使用pip install git+https://github.com/fastai/fastai.git

I followed the link here to install fastai library using pip install git+https://github.com/fastai/fastai.git

它给了我以下错误信息.即使我使用conda install pytorch-cpu -c pytorch成功安装了Pytorch,这些消息也保持不变 和pip3 install torchvision.可能是什么原因?

It gave me the following error message. These messages keep the same even I installed Pytorch successfully using conda install pytorch-cpu -c pytorch and pip3 install torchvision. What can be the reason?

Collecting torch<0.4 (from fastai==0.7.0)
  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\shuxi\AppData\Local\Temp\pip-install-7sjptuad\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\shuxi\AppData\Local\Temp\pip-install-7sjptuad\torch\

推荐答案

要解决此问题,请执行以下操作:

To fix this, do:

$ pip install --upgrade git+https://github.com/fastai/fastai.git

OR

$ pip install --no-cache-dir git+https://github.com/fastai/fastai.git

您的命令可能失败了,因为您已经安装了旧版本的割炬(0.1.2).该版本的割炬安装不支持pip,而是pip重定向用户以在浏览器中打开pytorch.org.就您而言,pip正在重用此缓存的程序包. --upgrade强制pip选择所有依赖程序包的最新版本.

Your command probably failed because you have installed a old version of torch (0.1.2) some time ago. pip was not supported for torch install for that version and pip instead redirected the user to open pytorch.org in the browser. In your case, pip is reusing this cached package. --upgrade forces pip to choose latest version of all depending packages.

这篇关于Anaconda下的Pytorch安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆