赞
踩
在 Ubuntu 系统上安装 Python 3.10.0,你可以按照以下步骤进行:
sudo apt update
sudo apt install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz
tar -xf Python-3.10.0.tar.xz
cd Python-3.10.0
./configure --enable-optimizations
make -j $(nproc)
sudo make altinstall
--enable-optimizations
选项会启用额外的优化,如PGO(Profile Guided Optimization),这可以使 Python 运行得更快,但会增加编译时间。python3.10 --version
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。