centos6.5安裝python3及virtualenv環境

 

1. 下載源碼:python

     wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgzjson

     wget http://mirrors.sohu.com/python/3.6.4/Python-3.6.4.tgzapp

 

2. 解壓並編譯:  spa

1 # cd Python-3.5.0
2 # ./configure --prefix=/Data/apps/Python3  --enable-shared
3 # make && make install 
4 # ln -s /Data/apps/Python3/bin/python3 /usr/bin/python3
5 # echo /Data/apps/Python3/lib >> /etc/ld.so.conf.d/python.conf
6 # ldconfig

3. 安裝virtualenvcode

1 # ln -s /Data/apps/Python3/bin/pip3 /usr/bin/pip3
2 # pip3 install virtualenv
3 # cd /Data/apps/
4 # ln -s /Data/apps/Python3/bin/virtualenv /usr/bin/virtualenv
5 # virtualenv -p /Data/apps/Python3/bin/python3 ENV3
6 # cd ENV3/
7 # ls
8 bin  include  lib  pip-selfcheck.json

4. virtualenv使用regexp

1 # source bin/activate  #激活env,之後安裝的包所有在ENV3裏,與系統隔離開
2 # # deactivate  #退出當前環境

5 virtualenvwrapperblog

   因爲本人不太喜歡這個程序,感受也沒方便到什麼地方,感興趣的能夠本身搞搞。ip

相關文章
相關標籤/搜索