Install VIRTUALENV, you can virtual multiple Python versions of the environment
1. Install Epel source
[email protected] ~]# Yum install epel-release-y
2, Installation Python-virtualenv
[email protected] ~]# Yum install python-virtualenv-y
3. Create VIRTUALENV Environment
[[email protected] ~]# mkdir ~/.virtualenv[[email protected] .virtualenv]# virtualenv --python=/home/python27/bin/python pywebrunning virtualenv with interpreter /home/python27/bin/pythonnew python executable in pyweb/bin/ Pythoninstalling setuptools ......................................................................................................................... ..... ..... ..... ..... ..... ..... ..... ....... .............. ........................ ... done ..... "."??????. Installing pip ......................................................................................................................... ......................................................................................................................... ....... ..... ....................... ... done.------------------------- [[Email protected] .virtualenv]# source ./pyweb/bin/activate (Pyweb) [[email protected] .virtualenv]# (Pyweb) [[email protected] .virtualenv]# # Show (Pyweb) that you have entered the virtual Environment #source ~/.virtualenv/pyweb/activate# #退出虚拟环境 (Pyweb) [[email protected] .virtualenv]# deactivate [[email protected] .virtualenv]# (Pyweb) [[email protected] pyweb]# python --versionpython 2.7.11 (Pyweb) [[Email protected] pyweb] # (Pyweb) [[email protected] pyweb]# deactivate [[email protected] . virtualenv]# virtualenv pyweb1new python executable in pyweb1/bin/ Pythoninstalling setuptools ......................................................................................................................... ..... ..... ..... ..... ..... ..... ..... ....... .............. ........................ ... done ..... "."??????. Installing pip ..................................................................................................................................................................................................................... ................................................................................................................ Done. [[email protected] .virtualenv]# [[email protected] .virtualenv]# source Pyweb1/bin/activate (PYWEB1) [[email protected] .virtualenv]# python --versionpython 2.6.6 (PYWEB1) [[email protected] .virtualenv]#
#完成了!
650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" J_0028.gif "/>
This article is from "every show." "Blog, be sure to keep this provenance http://xiaofengmo.blog.51cto.com/10116365/1772846
CentOS6.7 installing Python's virtualenv environment