Using virtualenv to build a Python virtual environment in a Windows environment

Source: Internet
Author: User
Tags virtual environment virtualenv

Install Python

Only one thing to be aware of when installing, be sure to add Python to the System environment variable check box.

Installing Virtualenv

After joining the system directory, there is a command line (CMD) that has more commands: PIP. The various third-party libraries that install Python can be downloaded automatically with PIP.

Open the command line and enter directly below the command line:

>pip Install Virtualenv

Download the installation Well, on the CD to the folder where you want to create the virtual Python environment, enter the command:

>virtualenv venv

activating virtualenv

In the folder there will be a subfolder called Venv, CD-To-venv, enter the command:

>scripts\activate

After the virtual environment is activated, the path to the Python interpreter is added to the path, but this is only temporary, and it only affects the current command-line dialog. If activated, the command prompt will change to this:

(venv) $

exiting the Python virtual environment

If you have completed the work in the virtual environment, want to go back to the global Python interpreter, you can enter: Deactivate, next time you want to use the virtual environment in the activation.

 

Using virtualenv to build a Python virtual environment in a Windows environment

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.