ubuntu18.04 安装python3.8.5

1. 卸载ubuntu18.04自带的python3.6

sudo apt-get purge remove python3.4

2. 下载python3.8.5源码

https://www.python.org/downloads/release/python-385/

3. 安装依赖

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

4. 编译源码

#cd Python-3.8.5

#make -j6

#make install

5. 查看python3版本

python3.8 --version

 

你可能感兴趣的:(ubuntu18.04 安装python3.8.5)