使用anaconda安装pytorch时出现问题,创建虚拟环境时没问题,从官网复制命令下载出现了问题:
(pytorch) C:\Users\14867>conda install pytorch torchvision torchaudio pytorch-cuda=11.7
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
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:
- torchaudio -> python[version='>=3.10,<3.11.0a0|>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0']
Your python: python==3.5
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 msvc_runtime conflicts for:
python==3.5 -> msvc_runtime
torchvision -> python[version='>=3.5,<3.6.0a0'] -> msvc_runtime
pytorch -> python[version='>=3.5,<3.6.0a0'] -> msvc_runtime
Package pytorch-cuda conflicts for:
torchaudio -> pytorch==1.13.1 -> pytorch-cuda[version='>=11.6,<11.7|>=11.7,<11.8']
torchvision -> pytorch-cuda[version='11.6.*|11.7.*']
torchaudio -> pytorch-cuda[version='11.6.*|11.7.*']
torchvision -> pytorch==1.13.1 -> pytorch-cuda[version='>=11.6,<11.7|>=11.7,<11.8']
Package typing conflicts for:
torchvision -> typing_extensions -> typing[version='>=3.7.4']
pytorch -> typing_extensions -> typing[version='>=3.7.4']
Package pytorch conflicts for:
torchvision -> pytorch[version='1.10.0|1.10.1|1.10.2|1.11.0|1.12.0|1.12.1|1.13.0|1.13.1|1.9.1|1.9.0|1.8.1|1.8.0|1.7.1|1.7.0|1.6.0|1.5.1|1.5.0|1.4.0|1.3.1|1.3.0|1.2.0|>=1.1.0|>=1.0.0|>=0.4']
torchaudio -> pytorch[version='1.10.0|1.10.1|1.10.2|1.11.0|1.12.0|1.12.1|1.13.0|1.13.1|1.9.1|1.9.0|1.8.1|1.8.0|1.7.1|1.7.0|1.6.0']
Package requests conflicts for:
torchvision -> requests
python==3.5 -> pip -> requests
cuda的版本没有问题,创建虚拟环境时python版本从3.5到3.9都试过都不行,求解决!!