Python Virtual Environment virtualenv

Source: Internet
Author: User
Tags virtual environment virtualenv

I am also a Python enthusiast, it is well known that Python extension, every time in order to test, install a variety of extensions, so that the local Python environment is very confusing, someone think of an isolated environment and the local environment is not related, can remove this isolation environment at any time, create, This is the Python virtual environment virtualenv (is not the feeling and the virtual operating system a bit similar Virtualbox)

Proceed directly to the following steps


Installing Virtualenv
$ sudo apt-get install Python-dev #python开发包 $ wget https://pypi.python.org/packages/source/v/virtualenv/ virtualenv-13.1.2.tar.gz#md5=b989598f068d64b32dead530eb25589a$ TAR-XVF virtualenv-13.1.2.tar.gz$ CD virtualenv-13.1.2/$ sudo python setup.py install
Create a virtual environment
$ virtualenv Vir_python
Activating a virtual environment
$ source Vir_python/bin/activate
Exiting a virtual environment
$ deactivate
Installation Extension Example

Using the Package tool PIP or Easy_install

$ pip Install [package name]
Installing the MySQL Extension
$ sudo apt-get install libmysqld-dev$ sudo easy_install mysql-python


PS: There is a virtualenvwrapper can be used to manage the virtual environment, interested friends can try to



Original address: Python Virtual Environment virtualenv

Python Virtual Environment virtualenv

Related Article

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.