Python Virtual Environment: virtualenv

Source: Internet
Author: User
Tags virtual environment virtualenv
安装
sudo yum install python-virtualenv
How to use

For example, create a **env** virtual environment

virtualenv ENV

By default, the virtual environment relies on site packages in the system environment, which means that the installed third-party package in the system will also be installed in the virtual environment, if you do not want to rely on the package, you can add parameters to --no-site-packages establish a virtual environment

virtualenv --no-site-packages [虚拟环境名称]
Start the virtual environment
cd ENVsource ./bin/activate

Note that at this point the command line one more (ENV) , env is the virtual environment name, then all the modules will only be installed in the directory.

Exiting a virtual environment
deactivate
Installing a Python suite in a virtual environment

The virtualenv comes with the PIP installation tool, so the kit that needs to be installed can be run directly:

pip install [套件名称]

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.