》》》
我一开始的python版本是3.9下载失败,cpu的成功了,但是GPU的不行
当时的下载命令:
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
一、一开始报这个bug
ERROR: Could not find a version that satisfies the requirement
pytorch1.13.1 (from versions: none)ERROR: No matching distribution found for pytorch1.13.1
ERROR: Could not find a version that satisfies the requirement
pytorch1.13.1 (from versions: none)ERROR: No matching distribution found for pytorch1.13.1
ERROR: Could not find a version that satisfies the requirement
pytorch1.13.1 (from versions: none)ERROR: No matching distribution found for pytorch1.13.1
网上一大堆各种解决办法,没到点子上
就是Python版本不够,升级python版本就好
conda install python=3.10.10
二、如果还报bug,如果是下面这个,不兼容:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
》如下解决办法
- 1.使用pip install --upgrade pip命令升级pip到最新版本,然后重新安装依赖包。
- 2.尝试安装指定版本的依赖包,例如pip install package_name==version_number。
- 3.如果以上方法都不能解决问题,可以使用conda来安装依赖包,它可以更好地处理依赖关系。首先安装Anaconda或Miniconda,然后在conda环境中使用conda install package_name命令安装依赖包。