WARNING: Running pip as the ‘root‘ user can result in broken permissions and

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Linux pip安装报错解决方案

使用 pip安装、更新python库时,提示以“root”用户身份运行 pip 可能会导致权限损坏和冲突,往往因为这个问题,导致我们无法更新pip或下载库失败

WARNING: Running pip as the ‘root‘ user can result in broken permissions and_第1张图片

解决方案:

1、找到pip安装位置:

find / -name pip-*

2、在该路径执行以下命令:

python3 -m venv tutorial-env
source tutorial-env/bin/activate

执行完成后,重新安装、升级就可以了!

你可能感兴趣的:(linux,pip,centos,linux)