al_mn 2024-05-24 10:34 采纳率: 50%
浏览 31
已结题

深度学习之mmrotate环境安装问题

首先创造了虚拟环境mmrotate
conda create --name mmrotate python==3.8
接着输入conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch 安装pytorch等
在这一步出现报错

Solving environment: \ warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides cudatoolkit >=11.5,<11.6 needed by torchvision-0.12.0-py310_cu115
  - nothing provides cudatoolkit >=11.5,<11.6 needed by torchaudio-0.11.0-py310_cu115
  - nothing provides cudatoolkit >=11.5,<11.6 needed by pytorch-1.11.0-py3.10_cuda11.5_cudnn8_0

Could not solve for environment specs
The following packages are incompatible
├─ pin-1 is installable and it requires
│  └─ python 3.11.* , which can be installed;
├─ pytorch 1.11.0  is not installable because there are no viable options
│  ├─ pytorch 1.11.0 would require
│  │  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
│  ├─ pytorch 1.11.0 would require
│  │  └─ cudatoolkit >=11.5,<11.6 , which does not exist (perhaps a missing channel);
│  ├─ pytorch 1.11.0 would require
│  │  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
│  ├─ pytorch 1.11.0 would require
│  │  └─ cudatoolkit >=11.1,<11.2 , which does not exist (perhaps a missing channel);
│  ├─ pytorch 1.11.0 would require
│  │  └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
│  └─ pytorch 1.11.0 would require
│     └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
├─ torchaudio 0.11.0  is not installable because there are no viable options
│  ├─ torchaudio 0.11.0 would require
│  │  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
│  ├─ torchaudio 0.11.0 would require
│  │  └─ cudatoolkit >=11.5,<11.6 , which does not exist (perhaps a missing channel);
│  ├─ torchaudio 0.11.0 would require
│  │  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
│  ├─ torchaudio 0.11.0 would require
│  │  └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
│  └─ torchaudio 0.11.0 would require
│     └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
└─ torchvision 0.12.0  is not installable because there are no viable options
   ├─ torchvision 0.12.0 would require
   │  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
   ├─ torchvision 0.12.0 would require
   │  └─ cudatoolkit >=11.5,<11.6 , which does not exist (perhaps a missing channel);
   ├─ torchvision 0.12.0 would require
   │  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
   ├─ torchvision 0.12.0 would require
   │  └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
   └─ torchvision 0.12.0 would require
      └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.11.* (labeled as 'pin-1')

显示Pins seem to be involved in the conflict. Currently pinned specs:

  • python 3.11.* (labeled as 'pin-1')
    是什么意思,我虚拟环境安装的是python3.8呀?
    请问这个问题怎么解决?
  • 写回答

3条回答 默认 最新

  • 关注

    上午好☀️☀️☀️️
    本答案参考ChatGPT-3.5

    在运行conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch命令时出现了错误,原因是当前虚拟环境中的Python版本可能与安装pytorch、torchvision、torchaudio相关的其他依赖版本不兼容。

    解决方案:

    1.检查当前虚拟环境中的Python版本是否为3.8,如果不是,请输入以下命令更改Python版本:

    conda activate mmrotate
    conda install python=3.8
    

    2.在安装pytorch、torchvision、torchaudio时指定正确的依赖版本,例如:

    conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.1 -c pytorch
    

    其中,cudatoolkit的版本需要与当前GPU的驱动版本匹配,如果未安装GPU或者GPU的驱动版本低于11.1,请更改为适当的版本。

    3.如果以上方法都无法解决问题,可以使用其他的虚拟环境工具,例如virtualenv或者pipenv,创建新的Python环境,再在其中安装pytorch、torchvision、torchaudio等相关库。

    注意事项:

    • 在安装pytorch相关库时,要确保与当前Python环境和GPU驱动版本都兼容;

    • 如果出现了依赖版本不兼容的问题,可以按照提示检查当前虚拟环境中是否有其他不兼容的依赖库,或者使用其他环境工具重新创建新的Python环境。

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

报告相同问题?

问题事件

  • 系统已结题 6月4日
  • 已采纳回答 5月27日
  • 创建了问题 5月24日

悬赏问题

  • ¥15 vs2019的js智能提示
  • ¥15 关于#开发语言#的问题:FDTD建模问题图中代码没有报错,但是模型却变透明了
  • ¥15 uniapp的h5项目写一个抽奖动画
  • ¥15 TeleScan不能修改bar
  • ¥100 请问我基于逐飞库写的这个有关于mp u6050传感器的函数,为什么输出的值是固定的?
  • ¥15 hadoop中启动hive报错如下怎么解决
  • ¥15 如何优化QWebEngineView 加载url的速度
  • ¥15 关于#hadoop#的问题,请各位专家解答!
  • ¥15 如何批量抓取网站信息
  • ¥15 Spring Boot离线人脸识别