安装pandas库时报错
报错代码
error: externally-managed-environment
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
这时我们输入
(mmpretrain) lxleave@DESKTOP-VP4CD3L:~/mmpretrain$ which python
/home/lxleave/miniconda3/envs/mmpretrain/bin/python
(mmpretrain) lxleave@DESKTOP-VP4CD3L:~/mmpretrain$ which pip
/usr/bin/pip
可以看到python环境和pip的位置不一致,这是 系统 pip,不在 conda 环境中,也就是说,刚刚装的包被装进了系统 Python中,而不是 conda 环境里。
解决办法:
安装包的时候加一个python -m
python -m pip install pandas
1401

被折叠的 条评论
为什么被折叠?



