Linux 安装python

python查看版本

whereis python

/usr/local/bin/python2.6

 

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

Gzipped source tarball下载

 

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

cd /opt/software

tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9

./configure --prefix=/usr/local/python-2.7.9  安装目录

make  编译
make install 安装

系统自带了python版本,我们需要为新安装的版本添加一个软链

/usr/local/python-2.7.9/bin

ln -s /usr/local/python-2.7.9/bin/python /usr/local/bin/python

你可能感兴趣的:(Linux)