赞
踩
1、直接安装 apt-get install python3.6 ,失败
root@91d2d47e8aee:/# apt-get install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by glob 'python3.6'
E: Couldn't find any package by regex 'python3.6'
2、添加ppa到系统,执行
add-apt-repository ppa:jonathonf/python-3.6
失败,问题:add-apt-repository找不到
对于ppa的解释:https://www.cnblogs.com/EasonJim/p/7119331.html
3、执行
apt-get update
4、执行以下
apt-get install python-software-properties
apt-get install software-properties-common
5、重复步骤
add-apt-repository ppa:jonathonf/python-3.6
安装完成!!!
6、查看Python版本以及指向
ls -l /usr/bin | grep python
7、删除原有Python链接
rm /usr/bin/python
8、建立新连接
ln -s /usr/bin/python3.6 /usr/bin/python
9、安装pip3
apt-get install python3-pip
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。