Virtual Environment
A Profile
On average, a project environment, because there may not be compatible version of the package used, virtual environment is necessary.
First, anaconda virtual environment
Second, with virtualwrapper, the installation can be used directly with pip
Installation pip install virtualenvwrapper the pip install virtualenvwrapper-win linux
1: Create a virtual environment
mkvirtualenv env_name
2: Switching Virtual Environment
workon env_name
3: Exit the current virtual environment
deactivate
4: Lists all virtual environments
lsvirtualenv
Modify the mkvirtualenv
default path:
In 我的电脑->右键->属性->高级系统设置->环境变量->系统变量
adding a parameter WORKON_HOME
will set the value of the parameter is the path you need.
Create a virtual environment when the specified Python
version:
In use mkvirtualenv
time can specify --python
parameters to specify a particular python
path:
mkvirtualenv --python==C:\Python36\python.exe hy_env