python - 如何解决传递依赖冲突问题?

标签 python python-3.x pandas dependencies pipenv

我用 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/

相关文章:

python - 高效精准的欧式距离计算

python - 使用一个 C 程序运行 python 脚本(不同的 python 版本)

python - Pandas 字符串搜索部分字符串

python - Pandas :计算一列中的空字符串

python - 递归 Think Python 2 练习 5.5

python - 使用 '%s' 参数化的 SQL 查询是什么样的?

python - 仅在开始日期和结束日期之间按标识符对两列求和

python - Tensorflow 抑制日志消息错误

python - 如何计算 pandas 中 n 列而不是行之间的差异

python - 如何在 macOs 上使用 libxml2 和 python?