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

 

posted @ 2019-09-12 10:17  spotfg  阅读(544)  评论(0编辑  收藏  举报