0

我按照这里的链接使用安装 fastai 库pip install git+https://github.com/fastai/fastai.git

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

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\
4

1 回答 1

3

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

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

或者

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

您的命令可能失败,因为您前段时间安装了旧版本的 torch (0.1.2)。pip不支持该版本的 Torch 安装,pip 而是将用户重定向到在浏览器中打开 pytorch.org。在您的情况下, pip 正在重用这个缓存的包。--upgrade强制 pip 选择所有依赖包的最新版本。

于 2018-08-08T15:52:54.157 回答