Ubuntu22.04安装python3.12
1.更新软件包列表sudo apt update
2.安装须要的依赖
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev
3.下载python3.12源码
wget https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz
4.解压源代码
tar xzf Python-3.12.2.tgz
5.编译和安装Python
cd Python-3.12.2
./configure --enable-optimizations
make -j $(nproc)
sudo make altinstall
6.验证安装是否乐成
python3.12 --version
7.安装pip3
apt install python3-pip
1.更新pip3
pip3 install --upgrade pip
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]