ubuntu安装python3.9

安装依赖

sudo apt install -y wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

下载安装

wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0b4.tgz
tar -zxvf Python-3.9.0b4.tgz
cd Python-3.9.0b4
./configure --prefix=/usr/local/python3.9
make
make install

已经安装成功
制造软连接
sudo /usr/local/python3.9/python/bin/python3.9 /usr/bin/python3.9

你可能感兴趣的:(Python)