安装Pytorch报错Error: No matching distribution found for typing-extensions (from torch==1.9.0)

安装Pytorch报错Error: No matching distribution found for typing-extensions (from torch==1.9.0)

问题描述:

用pip进行离线安装Pytorch的时候遇到报错。

先提供一些下载torch的.whl文件的网址:
官方网址:
http://download.pytorch.org/whl/torch/
镜像源:
http://mirrors.aliyun.com/pypi/simple/torch/
http://mirrors.aliyun.com/pypi/simple/torchvision/
https://pypi.doubanio.com/simple/torch/
https://pypi.doubanio.com/simple/torchvision/
https://pypi.tuna.tsinghua.edu.cn/simple/torch/
https://pypi.tuna.tsinghua.edu.cn/simple/torchvision/

pip离线安装指令

pip install pkg_name.whl

其中 pkg_name.whl 为你下载的安装包的名字,如:torch-1.9.0-cp37-cp37m-manylinux1_x86_64.whl

遇到如下报错:

ERROR:No matching distribution found for typing-extensions (from torch==1.9.0)

解决方案:

采用如下指令:

pip install --no-deps pkg_name.whl

出现如下提示即安装成功:

Successfully installed torch-1.9.0

你可能感兴趣的:(pytorch,深度学习,python)