系统相关
首页 > 系统相关> > Ubuntu16.04下升级Python到3.6.5

Ubuntu16.04下升级Python到3.6.5

作者:互联网

这里写自定义目录标题

1.安装pip和pip3

sudo apt-get install python-pip
sudo apt-get install python3-pip

2.增加ppa仓库:

sudo add-apt-repository ppa:deadsnakes/ppa

3.升级apt索引,安装python3.6:

sudo apt-get update
sudo apt-get install python3.6

4.更换系统默认的软链命令Python3到新的Python3.6

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

5.切换python3的指向:

sudo update-alternatives --config python3

标签:Ubuntu16.04,ppa,Python,sudo,apt,3.6,install,pip,python3
来源: https://blog.csdn.net/weixin_43659725/article/details/120130314