Ubuntu配置python操作

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

原文地址:https://www.cnblogs.com/7134g/p/11510449.html