1.安装aptitude
sudo apt-get install aptitude
2.安装依赖包
sudo aptitude -y install gcc make zlib1g-dev libffi-dev libssl-dev
3.下载 Python 3.6.9
wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz
4.解压压缩包
tar -xzvf Python-3.6.9.tgz
5.进入文件夹,并执行安装配置
cd Python-3.6.9/
./configure --prefix=/usr/local/python36 --enable-shared CFLAGS=-fPIC --enable-optimizations
make && make install
原文地址:https://www.cnblogs.com/DesignerA/p/11617458.html
时间: 2024-10-19 00:06:05