标签:python local source profile
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
本文出自 “自由之路” 博客,请务必保留此出处http://wangy8961.blog.51cto.com/10174968/1640902
标签:python local source profile
原文地址:http://wangy8961.blog.51cto.com/10174968/1640902