Ubuntu配置python操作

╄→гoц情女王★ 提交于 2019-12-25 05:01:11

Ubuntu16.04 安装python


查看当前python情况
root@localhost:/# cd /
root@localhost:/usr/bin# cd /usr/bin
root@localhost:/usr/bin# ls python*

修改原来的python链接名
root@localhost:/usr/bin# mv python python.bak


使用ubuntu镜像python安装
root@localhost:~# apt-get install python-software-properties
root@localhost:~# apt-get install software-properties-common
root@localhost:~# add-apt-repository ppa:jonathonf/python-3.6
root@localhost:~# apt-get update
root@localhost:~# apt-get install python3.6

创建软连接
root@localhost:/usr/bin# mv python3 python35
root@localhost:/usr/bin# mv python3.6 python3

 

#######################################
pip安装
root@localhost:~# apt-get install python3-pip

 


====================================================================
假如不记得位置,卸载python3方式
rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps 卸载pyhton3
whereis python3 |xargs rm -frv 删除所有残余文件
成功卸载!
whereis python 查看现有安装的python

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!