Linux安装Python2.7.9
1、下载Python2.7.9(其他版本地址:https://www.python.org/ftp/python/)
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
2、解压、编译安装
tar -zxvf Python-2.7.9.tgz
3、进入解压目录
cd Python-2.7.9
4、生成 Makefile
./configure --prefix=/usr/local/python-2.7.9
5、编译&安装
make & make install
6、系统自带了python2.6版本,为新安装的版本添加一个软链
ln -s /usr/local/python-2.7.9/bin/python /usr/bin/python2.7.9
【可选】python2.7.9设置为默认的python
ln -s /usr/bin/python2.7.9 /usr/bin/python
Linux安装Python2.7.9
最新推荐文章于 2021-08-03 10:42:21 发布