Creating a virtual Environment in Python (virtualenv module)

Source: Internet
Author: User
Tags virtual environment virtualenv

For Environment: win7,python2.7

requires virtualenv module
1. Test whether the Virtualenv module is installed
    import virtualenv   #没有报错则已安装
    You will need to install the Virtualenv module
    pip install virtualenv
2. First create a directory (f://learning_log)
    switch to the corresponding directory after use: virtualenv ll_env  #ll_env虚拟环境名 (optional)    
3. Activate
    ll_env\scripts\activate
    display (ll_env) F:\learning_log> The activation is successful
    Note: Windows users may get an error when activating, as the Activate.bat will be in the same        ACTIVATE.PS1 is generated in the       directory, and PowerShell is not allowed to execute *.ps1       by default       script files. So first you need to turn on permissions. Open permissions only need to be in PowerShell             execute Set-executionpolicy RemoteSigned. Enter Y last, and enter!
        Then, enter the activation instructions again in the corresponding directory to activate.
4. Exit the virtual Environment
    (ll_env) f:\learning_log>ll_env\scripts

Create a virtual Environment (virtualenv module) in Python

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.