首页 > Python资料 博客日记
ERROR: pip‘s dependency resolver does not currently take into account all the packages 的解决方法
2024-03-02 21:00:04Python资料围观168次
一、问题分析
博主在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系列】SQLAlchemy 基本介绍
- 【Python】selenium 的EC.presence_of_element_located 和 EC.element_to_be_clickable 的区别
- 从零到一!超详细Pycharm安装教程(图解+详细步骤)
- python json jsonl 的用法
- 【Python篇】深度探索NumPy(下篇):从科学计算到机器学习的高效实战技巧
- boto3:Python连接S3对象存储并进行文件操作(上传、下载、删除)
- 全网最适合入门的面向对象编程教程:50 Python函数方法与接口-接口和抽象基类
- Python pycryptodome类库使用学习总结
- import torch 报错:WinError 126
- 如何在Java中实现邮件发送功能?
点击排行
- 版本匹配指南:Numpy版本和Python版本的对应关系
- Python 可视化 web 神器:streamlit、Gradio、dash、nicegui;低代码 Python Web 框架:PyWebIO
- 版本匹配指南:PyTorch版本、torchvision 版本和Python版本的对应关系
- 相关性分析——Pearson相关系数+热力图(附data和Python完整代码)
- Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based proj
- Python pyinstaller打包exe最完整教程
- Anaconda版本和Python版本对应关系(持续更新...)
- Python与PyTorch的版本对应