已解决The following specifications were found to be incompatible with the existing python installation

已解决The following specifications were found to be incompatible with the existing python installation

在这里插入图片描述

报错问题

之前在工作中遇到过这个坑,记录一下问题以及解决方法,不一定针对所有情况都能用,但是可以供大家参考。
问题描述如下:

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

  • h5py==2.7.0 -> python[version=‘>=2.7,<2.8.0a0|>=3.5,❤️.6.0a0|>=3.6,❤️.7.0a0’]
    Your python: python=3.8
    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.

不可满足的错误:发现以下规格
要与环境中现有的python安装不兼容,请执行以下操作:
规格:
-h5py==2.7.0->python[version=‘>=2.7,<2.8.0a0 |>=3.5,❤️.6.0a0 |>=3.6,❤️.7.0a0’]
您的python:python=3.8
如果python位于链的最左侧,那么这就是您所要求的版本。当python出现在右侧时,这表明左侧的内容在某种程度上不适用于您所约束的python版本。请注意,除非您明确指定,否则conda不会将python版本更改为其他次要版本。

在这里插入图片描述

解决方法

在这里插入图片描述

当前安装的包的版本与当前python版本不合适或者不兼容,所以,需要根据python语言的版本安装所对应的包!
比如python3.7以上的版本,安装的h5py版本不能低于3.6版本!

PS

有问题评论区留言即可

猜你喜欢

转载自blog.csdn.net/weixin_50843918/article/details/130444965