Python 以“根”用户运行pip可能会导致权限中断和与系统包管理器的行为冲突

Python 以“根”用户运行pip可能会导致权限中断和与系统包管理器的行为冲突

岳小威子
2023-03-01 / 67 个字 / 0 评论 / 74 阅读 / 加载耗时:18ms / 正在检测是否收录...
温馨提示:
本文最后更新于2023年03月01日,已超过422天没有更新,若内容或图片失效,请留言反馈。

问题

Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager
以“根”用户运行pip可能会导致权限中断和与系统包管理器的行为冲突

解决

建立虚拟环境,基于Centos7
python3 -m venv tutorial-env
source tutorial-env/bin/activate

然后在里面执行你的命令即可

退出虚拟环境

退出venv 环境,使用 deactivate 命令:deactivate

文章到这里就结束了

您在本文章已经停留了大概
喜欢的话就点个赞吧!或着请我喝个冰可乐,我就太感谢你了!


0
打赏
拜谢打赏(☆ω☆)

感谢老板,老板大气。。

评论 (0)

取消