Install Python virtual environment virtualenvwrapper win under windows
- 2021-06-28 13:10:19
- OfStack
1. Installation
Execute Command
pip install virtualenv
For the convenience of using virtualenv, you can use virtualenvwrapper
Execute Command
pip install virtualenvwrapper-win
After installation, you can create virtualenvwrapper by command
2. Basic Use
2.1 Create virtualenvwrapper
mkvirtualenv my_env
Then create a folder of Env under your current user and install this virtual environment into this directory. If Python2 and Python3 are installed on your computer and virtualenvwrapper are installed on both versions, the Python version that first appears in the environment variable will be used as the Python interpreter for this virtual environment.
2.2 Switch to a virtual environment
workon my_env
2.3 Exit the current virtual environment
deactivate
2.4 Delete a virtual environment
rmvritualenv my_env
2.5 List directories where all virtual environments are located
lsvirtualenv
2.6 Enter the directory where the virtual environment is located
cdvirtualenv
When using mkvirtualenv, you can specify the--python parameter to specify the specific Python path
mkvirtualenv --python==C:\python\python.exe my_env
summary
The above is the Python virtual environment virtualenvwrapper-win installed under windows introduced to you by this site. I hope it will be helpful to you. If you have any questions, please leave a message for me. This site will reply to you in time!