源码安装python(ubuntu 16.04测试)

从python官网下载python的压缩包

https://www.python.org/downloads/

解压文件夹,进入文件夹

  • 新建python安装目录
sudo mkdir /usr/local/python38

-运行configure

./configure prefix=/usr/local/python38 --with-openssl=/usr/local/openssl
sudo make && sudo make install

创建软链

sudo ln -s /usr/local/python38/bin/pip3.8  /usr/bin/pip38
sudo ln -s /usr/local/python38/bin/python3.8  /usr/bin/python38

你可能感兴趣的:(源码安装python(ubuntu 16.04测试))