我正在try 使用PyCharm中的conda环境安装pytorch版本1.6.0.
我查阅了安装相同设备的官方文档.我想用的是中央处理器版本的 torch .因此,我使用了下面粘贴的命令.
conda install pytorch==1.6.0 torchvision==0.7.0 cpuonly -c pytorch
使用此命令,我得到了以下粘贴的响应
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort. failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- pytorch==1.6.0 -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0|>=3.11,<3.12.0a0|3.9.16|3.8.16|3.9.10|3.8.12|3.7.12|3.7.10|3.7.10|3.6.12|3.7.9|3.6.12|3.6.9|3.6.9|3.6.9|3.6.9|3.4.*',build='2_73_pypy|4_73_pypy|5_73_pypy|1_73_pypy|0_73_pypy|0_73_pypy|5_73_pypy|3_73_pypy|1_73_pypy|0_73_pypy']
- pytorch==1.6.0 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
- torchvision==0.7.0 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package zlib conflicts for:
torchvision==0.7.0 -> pillow[version='>=4.1.1'] -> zlib[version='1.2.*|1.2.11|1.2.11.*|>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|1.2.8|>=1.2.13,<1.3.0a0']
python=3.9 -> pypy3.9=7.3.11 -> zlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0']
由于这不起作用,我使用pip安装了Torch 1.6.0.(使用以下命令)
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
这也没有起作用,我从我的终端得到了以下响应
ERROR: Could not find a version that satisfies the requirement torch==1.6.0+cpu (from versions: 1.7.1, 1.7.1+cpu, 1.7.1+cu101, 1.7.1+cu110, 1.8.0, 1.8.0+cpu, 1.8.0+cu101, 1.8.0+cu111, 1.8
.1, 1.8.1+cpu, 1.8.1+cu101, 1.8.1+cu102, 1.8.1+cu111, 1.9.0, 1.9.0+cpu, 1.9.0+cu102, 1.9.0+cu111, 1.9.1, 1.9.1+cpu, 1.9.1+cu102, 1.9.1+cu111, 1.10.0, 1.10.0+cpu, 1.10.0+cu102, 1.10.0+cu11, 1.10.0+cu113, 1.10.1, 1.10.1+cpu, 1.10.1+cu102, 1.10.1+cu111, 1.10.1+cu113, 1.10.2, 1.10.2+cpu, 1.10.2+cu102, 1.10.2+cu111, 1.10.2+cu113, 1.11.0, 1.11.0+cpu, 1.11.0+cu113, 1.11.0+cu115, 1.12.0, 1.12.0+cpu, 1.12.0+cu113, 1.12.0+cu116, 1.12.1, 1.12.1+cpu, 1.12.1+cu113, 1.12.1+cu116, 1.13.0, 1.13.0+cpu, 1.13.0+cu116, 1.13.0+cu117, 1.13.1, 1.13.1+cpu, 1.13.1+cu116, 1.13.1+cu117, 2.0.0, 2.0.0+cpu, 2.0.0+cu117, 2.0.0+cu118, 2.0.1, 2.0.1+cpu, 2.0.1+cu117, 2.0.1+cu118)
ERROR: No matching distribution found for torch==1.6.0+cpu
我特别想使用Torch 1.6.0和Torchvision 0.7.0,因为我想要培训的深度学习模型构建在这两个包的指定版本之上.
如何解决此错误?