准备工作
- 虚拟机或云服务器
- 下载Python3.10.1压缩包
- 远程连接服务器工具
下载依赖
- 更新下软件源
apt-get update
- 下载支持Python3的依赖
apt-get install libqgispython3.10.4
下载Python3.10.1压缩包
wget https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz
安装Python3.10.1
./configure --prefix=/usr/local/python3.10.1 --enable-optimizations
make && make install
配置软连接
ln -s /usr/local/python3.10.1/bin/python3.10 /usr/bin/python
ln -s /usr/local/python3.10.1/bin/pip3.10 /usr/bin/pip
检查Python是否正常安装
到此我们已经安装完Python了