Measuring open the road to one hundred twenty-three: quickly build python virtual environment

 

 

Prerequisite: python3.4 + has been installed and is operational environment

 

A: Manual build:

Ready for a working directory

Administrators run cmd, enter the directory prepared inside

 

 

 

Execute the command: python -m venv virtual environment name

 

 

Activate the virtual environment (executed outside venvname): venvname \ scripts \ activate

 

Run python, this is the time to run the virtual environment python

 

 

Exit Virtual Environment (executed outside venvname): venvname \ scripts \ deactivate

 

 

 

Two: pycharm automatically build

When creating a new project, choose to create a virtual environment

 

 

After create a new environment is completely isolated from other environments, there is no third-party libraries

 

 

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11441132.html