使用sudo权限
sudo -H [ ]
python命令 为符号软连接,可指向python2或3,默认2.7 。使用python3可以改软连接也可直接使用python3(也是软连接)
pip 与 pip3 对应python2和3
pip list 显示安装的包
pip -V 显示版本
更新pip
sudo -H pip install --upgrade pip
sudo -H pip3 install --upgrade pip
“It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall “类似问题:
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决:
sudo pip3 install six --upgrade --ignore-installed six
本文详细介绍了如何在Python环境中使用sudo权限进行操作,包括如何更新pip和pip3到最新版本,以及解决卸载包时遇到的特定问题。通过具体的命令示例,读者可以学习到如何正确地管理Python环境下的软件包。
1462

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



