1、下载
wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz
2、解压
tar -xvf Python-3.3.0.tgz
3、确定安装路径
mkdir /usr/local/python3
4、编译安装
cd Python-3.3.0
make install
5、如果有老版本,可以覆盖老版本链接
mv /usr/bin/python /usr/bin/python_old
ln -s /usr/local/python3/bin/python3 /usr/bin/python
6、测试
python
Python 3.3.0 (default, Sep 8 2015, 15:22:55)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz
2、解压
tar -xvf Python-3.3.0.tgz
3、确定安装路径
mkdir /usr/local/python3
4、编译安装
cd Python-3.3.0
./configure --prefix=/usr/local/python3
makemake install
5、如果有老版本,可以覆盖老版本链接
mv /usr/bin/python /usr/bin/python_old
ln -s /usr/local/python3/bin/python3 /usr/bin/python
6、测试
python
Python 3.3.0 (default, Sep 8 2015, 15:22:55)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[share]
./configure --prefix=/usr/local/python3 –enable-shared CFLAGS=-fPIC