标签:验证 版本 nat tps wget with libs es5 工作
#如果已经安装python3.6,删除
$ apt-get remove --purge python3.6
然后从源代码下载源代码并构建并准备构建系统:
wget https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tgz
构筑python环境,安装需要的包:
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
现在配置,制作,制作altinstall(重要)
$ tar xvf Python-3.6.7.tgz $ cd Python-3.6.7/ $ ./configure --enable-optimizations --with-ensurepip=install $ make altinstall
# 现在通过runnning验证安装
$ python3.6 -V which python3.6
复制python3.6的路径,它应该是/usr/bin/python3.6或/usr/local/bin/python3.6
您现在可以使用update-alternatives来管理计算机上的所有python版本
$ ls /usr/bin/python* # e.g. /usr/bin/python2.7 /usr/bin/python3.4 $ /usr/bin/python3.6 $ update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 $ update-alternatives --install /usr/bin/python python /usr/bin/python3.4 1 $ update-alternatives --install /usr/bin/python python /usr/local/bin/python3.6 2
有任何问题,建议留言,或者加QQ群:780450250
标签:验证 版本 nat tps wget with libs es5 工作
原文地址:https://www.cnblogs.com/libaoshan/p/11294547.html