从源码安装特定版本 python

2019-04-03  本文已影响0人  acpan

1. 从官网下载个 tarball

https://www.python.org/downloads/release/python-363/

2. 依次执行

cd /usr/src

sudo wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz

sudo tar xvf Python-3.6.3.tar.xz

cd Python-3.6.3

sudo ./configure --enable-optimizations

sudo apt-get install zlib1g-dev

sudo make altinstall (与 make install 有区别)

python3.6(ctrl d)

sudo su - jenkins

cd /home/jenkins/ci/workspace

virtualenv --python=python3.6 python3.6.3-env

source /home/jenkins/ci/workspace/python3.6.3-env/bin/activate

上一篇下一篇

猜你喜欢

热点阅读