CentOS 6.5安装python3.3.4

1、下载python

# cd ~/Downloads/
# wget http://www.python.org/ftp/python/3.3.4/Python-3.3.4.tgz

2、解压Python-3.3.4.tgz

# tar -xzvf Python-3.3.4.tgz

3、创建安装目录

# mkdir /usr/local/python-3.3

4、编译安装Python-3.3.4

# cd Python-3.3.4
编译命令: 
# make
安装命令: 
# make install

5、配置环境(CentOS 6.5自带有python2)

①添加/usr/local/python-3.3/bin到PATH

# cd /etc
# vi /etc/profile
末尾添加PATH=$PATH:/usr/local/python-3.3/bin
# source profile
# echo $PATH

②创建链接文件

# cd /usr/bin
# rm -rf python
# ln -s /usr/local/python-3.3/bin/python3.3 ./python



你可能感兴趣的:(python,local,source)