There are two ways to create a virtual environment folder , For example, my virtual environment folder is python_ven_demo:
First, create a new folder python_ven_demo,
Then go to the folder cd python_ven_demo,
Then build a virtual environment :python -m venv . ( notes :venv After that, add a little space “.”)
Create a virtual environment folder and virtual environment directly under the current directory :
Direct input python -m venv python_ven_demo ( Virtual environment folder name , Create a folder directly in the current directory , At the same time, the virtual environment is generated )
need cd To Sripts Execute under directory activate Command to enter :
Be careful : Only after the virtual environment is activated - Only by installing plug-ins can they be isolated from the global environment, or the virtual environment will become a decoration
The virtual environment is now isolated from the global environment, and different plug-ins can be installed in different environments :
The steps are the same. The activation method needs to be in bin Under the table of contents : Use source activate Command to activate :