美肚鲨ccc 2023-02-12 15:35 采纳率: 100%
浏览 314
已结题

安装pytorch出现问题求解决

使用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都试过都不行,求解决!!

  • 写回答

2条回答 默认 最新

  • 元气少女缘结神 2023-02-12 15:45
    关注

    更新一下conda再重试。
    conda update -n base conda
    conda update --all

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 2月20日
  • 已采纳回答 2月12日
  • 创建了问题 2月12日

悬赏问题

  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装