pip虚拟环境包的问题

前言:

今天创建了一个虚拟环境,之后装了一个ray的,结果报错

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.

clearpath-config 1.3.3 requires importlib-metadata, which is not installed.

generate-parameter-library-py 0.5.0 requires jinja2, which is not installed.

generate-parameter-library-py 0.5.0 requires typeguard, which is not installed.

上述的这些包和我要装的包一毛钱关系都没有,到底是什么问题呢?

原因:

我在~/.bashrc里面有

复制代码
source /opt/ros/humble/setup.bash

这样导致

复制代码
echo $PYTHONPATH

结果中

由于pip安装包的时候会检查pip list的包,而pip list找包的路径包括了PYTHONPATH这个环境变量,这样导致虚拟空间里面有很多不应该存在的包。

这样在pip安装包的时候,会检查依赖关系,发现有些包的依赖关系不满足,所以报错了。

相关推荐
ZhengEnCi18 小时前
P2M-Matplotlib折线图完全指南-从数据可视化到趋势分析的Python绘图利器
python·matlab·数据可视化
ZhengEnCi20 小时前
P2L-Matplotlib饼图完全指南-从数据可视化到图表定制的Python绘图利器
python·matlab
曲幽20 小时前
你的REST接口还在“过度投喂”数据吗?——FastAPI + GraphQL实战避坑指南
python·fastapi·web·graphql·route·cors·rest·strawberry
用户83580861879121 小时前
基于 Self-RAG 与列表级重排序的进阶 RAG 系统设计与实现
python
Warson_L2 天前
Python `Annotated` 与 LangGraph Reducer 学习笔记
python
韩师傅2 天前
海天线算法的前世今生
python·计算机视觉
韩师傅2 天前
当你的甲方设备过烂,要如何快速出效果?
python·计算机视觉
Warson_L2 天前
LangGraph的MessageState and HumanMessage
python
韩师傅2 天前
当你的甲方吐槽天空不够蓝,你应该如何应对
python·计算机视觉
Warson_L2 天前
python的类&继承
python