首页 > Python资料 博客日记
ERROR: pip‘s dependency resolver does not currently take into account all the packages 的解决方法
2024-03-02 21:00:04Python资料围观291次
一、问题分析
博主在PyCharm中使用pip命令 pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
安装项目所需的依赖包,出现:ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
anaconda-project 0.9.1 requires ruamel-yaml, which is not installed.
notebook 6.3.0 requires tornado>=6.1, but you have tornado 5.1.1 which is incompatible.
jupyterlab 3.0.14 requires tornado>=6.1.0, but you have tornado 5.1.1 which is incompatible.
jupyter-server 1.4.1 requires tornado>=6.1.0, but you have tornado 5.1.1 which is incompatible.
distributed 2021.4.0 requires tornado>=6.0.3; python_version >= “3.8”, but you have tornado 5.1.1 which is incompatible.
从以上报错信息来看,博主环境中已安装的 notebook 6.3.0、jupyterlab 3.0.14、jupyter-server 1.4.1、distributed 2021.4.0
这几个版本的包与我现在安装 requirements.txt
中的项目依赖包 qt4c、qt4w
所需要的 tornado
版本不一致,说白了就是你python环境中的部分包与 tornado>=6.1.0
版本兼容,而你现在安装的项目所需要的包与 tornado==5.1.1
版本兼容,这就是问题所在。
同理现在我们安装 tornado>=6.1.0
版本,就会提示 qt4w 2.1.5
与 tornado>=6.1.0
不兼容。
二、解决方法
通过以上问题分析,比较好的解决方法就是卸载不兼容 tornado==5.1.1
的包,即 notebook 6.3.0、jupyterlab 3.0.14、jupyter-server 1.4.1、distributed 2021.4.0
,再重新安装即可(安装时不指定版本);因为qt4c、qt4w
所需要的 tornado
版本只能是 5.1.1,所以为了兼顾两边,只能选择卸载重装。
卸载 控制台中提示不存在兼容的所有包
pip uninstall tornado
pip uninstall notebook jupyterlab jupyter-server distributed
pip uninstall -r requirements.txt
安装 code>tornado==5.1.1
版本
pip install tornado==5.1.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/
安装 notebook jupyterlab jupyter-server distributed
包
pip install notebook jupyterlab jupyter-server distributed -i https://pypi.tuna.tsinghua.edu.cn/simple/
安装 requirements.txt
中的项目依赖包
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
另外一种方法:其实我们通过pip命令在安装包时经常会出现不兼容的提示,可以将本地pip版本进行升级后,再进行尝试安装~
python -m pip install --upgrade pip
最后说明一点:其实出现不兼容的情况,也是可以忽略不计的,虽然提示了不兼容,但是实际是安装成功的~
标签:
相关文章
最新发布
- 光流法结合深度学习神经网络的原理及应用(完整代码都有Python opencv)
- Python 图像处理进阶:特征提取与图像分类
- 大数据可视化分析-基于python的电影数据分析及可视化系统_9532dr50
- 【Python】入门(运算、输出、数据类型)
- 【Python】第一弹---解锁编程新世界:深入理解计算机基础与Python入门指南
- 华为OD机试E卷 --第k个排列 --24年OD统一考试(Java & JS & Python & C & C++)
- Python已安装包在import时报错未找到的解决方法
- 【Python】自动化神器PyAutoGUI —告别手动操作,一键模拟鼠标键盘,玩转微信及各种软件自动化
- Pycharm连接SQL Sever(详细教程)
- Python编程练习题及解析(49题)
点击排行
- 版本匹配指南:Numpy版本和Python版本的对应关系
- 版本匹配指南:PyTorch版本、torchvision 版本和Python版本的对应关系
- Python 可视化 web 神器:streamlit、Gradio、dash、nicegui;低代码 Python Web 框架:PyWebIO
- 相关性分析——Pearson相关系数+热力图(附data和Python完整代码)
- Anaconda版本和Python版本对应关系(持续更新...)
- Python与PyTorch的版本对应
- Windows上安装 Python 环境并配置环境变量 (超详细教程)
- Python pyinstaller打包exe最完整教程