linux 系统,使用源码安装 Python

安装多版本 Python,但是有些版本没有合适的安装包

参考:https://blog.csdn.net/wxhcyy/article/details/107718794

  1. 下载安装文件
1
2
# 链接从官方找
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
  1. 解压
1
2
export d_path=''
tar xf Python-3.6.8.tar.xz -C $d_path
  1. 安装
1
2
3
4
cd $d_path
./configure --prefix=$d_path/python3.6.8
make all
make install
  1. 测试
1
$d_path/python3.6.8/python -V
Licensed under CC BY-NC-SA 4.0
最后更新于 Aug 26, 2022 00:00 UTC
comments powered by Disqus