深度学习, pip 离线安装pytorch

不管是 pip install 还是依赖于conda install,
万恶的网速总是容易导致终端下载软件包失败,
所以依赖下载工具讲whl包直接下载下来, 有断点续传功能非常赞

  1. 在系统上安装 Python 开发环境
    推荐高于Python 3.4 的版本
    python --version
    pip --version
  1. install 调用找到依赖的whl安装包, 然后迅雷等下载下来

pip install torch torchvision
Collecting torch
Downloading https://files.pythonhosted.org/packages/98/14/8fb914c6f13e9d889f4e14f6d811901fc48fde6be7f052756d08e861f960/torch-1.1.0.post2-cp36-none-macosx_10_7_x86_64.whl (88.1MB)
0% |▏ | 327kB 8.9kB/s eta 2:43:38

链接为 https://files.pythonhosted.org/packages/98/14/8fb914c6f13e9d889f4e14f6d811901fc48fde6be7f052756d08e861f960/torch-1.1.0.post2-cp36-none-macosx_10_7_x86_64.whl

  1. pip install ~torch.whl
  1. 同理, 获取torchvision
    pip install torchvision
    Collecting torchvision
    Downloading https://files.pythonhosted.org/packages/46/dc/41ff28bb16bfc428d5c30b349f2909ddecb9fda30f5776888a31d19a5d4b/torchvision-0.3.0-cp36-cp36m-macosx_10_7_x86_64.whl (231kB)
    39% |████████████▊ | 92kB 10kB/s eta 0:00:14

整理依次依赖的链接,卡住地方手动下载下来

你可能感兴趣的:(深度学习, pip 离线安装pytorch)