Python more than 3.3 uses venv instead of the original Python2 used to create the VIRTUALENV virtual environment.
The purpose of the virtual environment is to make the python packages of different projects not interfere with each other and avoid the problems arising from them.
Now demonstrate how to create a virtual environment on the desktop
c:\users\dell\desktop>mkdir python3venvtestc:\users\dell\desktop>CD python3venvtestc:\users\ Dell\desktop\python3venvtest>python-m venv test
This creates a virtual environment named Test that is not recommended to install too many third-party modules on native Python because the packages in the virtual environment are Python copied from the computer itself.
The test directory has three folders include,lib,scripts, one file pyvenv.cfg.
The way to start the virtual environment is to:
c:\users\dell\desktop\python3venvtest>test\scripts\activate.bat (test) C:\Users\dell\Desktop\ Python3venvtest>
Then, as with the usual steps to install the Python package, use PIP install xxxx to install the package you need.
The way to exit a virtual environment is:
(test) C:\users\dell\desktop\python3venvtest>Test\scripts\deactivate.batc:\users\dell\desktop\python3venvtest >
This will exit the virtual environment, the next time you want to enter the virtual environment in the corresponding path input command Activate.bat can enter.
Python 3 Creating a virtual environment using VENV