我用 pipenv
命令在我的 Python 虚拟环境中安装包。
我需要更新版本的 pandas
.所以我安装成功:
pipenv install pandas~=1.0
然后我安装了 Apache Beam:pipenv install apache-beam[gcp,test]
这安装了 Apache Beam 但给了我一个错误:[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches pandas<0.25,>=0.23.4,~=1.0
...
There are incompatible versions in the resolved dependencies.
它降级了我的 pandas
版本到 0.24.2
这不支持我需要的东西。我该如何解决这个问题?
谢谢
最佳答案
尝试通过运行以下命令清除锁定文件中的缓存:
$ pipenv lock --pre --clear
看看以后能不能安装。如果出现错误,请尝试:
$ pipenv lock --clear
关于python - 如何解决传递依赖冲突问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62340225/