当前位置:   article > 正文

ubuntu 22.04 jammy 手动安装 python 3.6_ubuntu 安装python 3.6

ubuntu 安装python 3.6

1 准备编译器

sudo apt-get 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 \
libgdbm-dev libnss3-dev libedit-dev libc6-dev
  • 1
  • 2
  • 3
  • 4

2 下载 python 3.6,并解压

wget https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz

tar -xzf Python-3.6.15.tgz
  • 1
  • 2
  • 3

3.编译

cd Python-3.6.15
./configure --enable-optimizations  -with-lto  --with-pydebug
make -j 8  # adjust for number of your CPU cores
sudo make altinstall
  • 1
  • 2
  • 3
  • 4

4.查看

python3.6 -V
  • 1

参考
https://stackoverflow.com/questions/72102435/how-to-install-python3-6-on-ubuntu-22-04
https://cloud.tencent.com/developer/ask/sof/106928733

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/blog/article/detail/53474
推荐阅读
相关标签
  

闽ICP备14008679号