Python_virtualenvwrapper Installation and use

Source: Internet
Author: User

How do I create a current Python version of a virtual environment?

1. Installing virtualenv

Pip Install-i https://pipy.douban.com/simple virtualenv

2. Create a virtual environment

Virtualenv env

--current directory Create a virtual environment env

How do I start a virtual environment?

To the Env directory under the Scripts directory, enter the command:

Activate.bat

  Entering a virtual environment

How do I exit a virtual environment?

Enter Command Deactivate.bat

How do I create a new virtual environment and specify a python version?

--virtualenv-p Python installation directory virtual environment name

Virtualenv-p C:\users\jia2jiayuan\appdata\local\programs\python\python35-32/python.exe Env_py3

Have a big problem with the above?

Need to remember the installation path, a bit unable to carry, through the Virtualenvwrapper library, the Virtual Environment Management Pack

1. Install third-party libraries in Windows environment via PIP install Virtualenvwrapper-win

2. Add Workon_home to the environment variable to set the virtual Environment storage directory

3. Workon--List all the virtual environments

4. Workon Virtual Environment Name – Enter virtual environment

5. MKVIRTUALENV Virtual Environment Name-Create a new virtual environment and automatically enter

How do I exit a virtual environment?

Enter the command:

Deactivate

How do i specify a python version?

"Mkvirtualenv–python= Installation path Virtual environment name"

--by specifying the Python path installation, do not specify that the path will be in the default version of Python

Python_virtualenvwrapper Installation and use

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.