python使用记录

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的版本,说明已经成功安装。

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值