CentOS6.7 installing Python's virtualenv environment

Source: Internet
Author: User
Tags virtual environment virtualenv


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.