ubuntu 切换python版本
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
sudo update-alternatives --config python
update-alternatives --list
当我的Ubuntu install某个东西时,给出下面提示
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is an other process using it?
删除锁定文件,行了
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
2.安装pip3
现在我们就可以开始安装我们的pip3了,输入命令sudo apt-get install python3-pip
,这个会从国内的源下载pip3并进行自动安装。完成之后,输入pip3 -V
查看pip3的版本,如果正常显示pip3的版本,说明已经成功安装。