Tony Einstein 2023-02-05 23:27 采纳率: 45%
浏览 375
已结题

UnsatisfiableError: The following specifications were found to be?

conda安装tensorflow-gpu2.6.0报错:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - wheel -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.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

翻译是:

不满意错误:找到以下规范
与环境中现有的python安装不兼容:
规格:
-wheel->python[版本='>=2.7,<2.8.00|>=3.6,<3.7.00|>=3.8,<3.9.00|>>=3.7,<3.8.00|>=3.5,<3.6.00']
您的python:python=3.9
如果python位于链的最左侧,那就是您要求的版本。
当python出现在右边时,这表明左边的东西不知何故
不适用于您受限的python版本。请注意,conda不会
将python版本更改为其他次要版本,除非明确指定
那个
发现以下规范彼此不兼容:
输出格式:请求的包->可用版本

但是我之前使用python3.7、3.8也是都不行!
我的环境关键库的版本为:

certifi      2022.12.7
pip          22.3.1
setuptools   65.6.3
wheel        0.38.4
wincertstore 0.2

请问我该怎么办,貌似tensorflow-gpu与conda产生了分歧。

我更新了setuptools 和wheel 版本到最新依然不能解决问题。

  • 写回答

1条回答 默认 最新

  • 社区专家-Monster-XH 2023-02-06 00:06
    关注

    点击右侧采纳即可:
    错误是由于conda的环境要求与你试图安装的tensorflow-gpu不兼容造成的。具体地说,conda需要的python版本不支持你正在使用的python 3.9版本,但3.7、3.8版本也不行。

    一个解决方案是创建一个新的conda环境并在该环境中安装支持的python版本和tensorflow-gpu,例如:

    
    conda create -n env_name python=3.8
    conda activate env_name
    conda install tensorflow-gpu==2.6.0
    
    

    如果仍然无法安装,可以尝试更改conda配置以允许更新python版本:

    conda config --set allow_conda_downgrades true
    
    

    如果仍然不行,可以尝试使用pip安装:

    pip install tensorflow-gpu==2.6.0
    
    

    请注意,使用pip安装tensorflow-gpu可能会对其他conda包造成影响,并且可能需要额外的配置。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 2月14日
  • 已采纳回答 2月6日
  • 创建了问题 2月5日

悬赏问题

  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机