Pycharm create a python virtual environment

Pycharm create a python virtual environment

  1. Open the File -> Settings
    Here Insert Picture Description

  2. Found Project Interpreter
    Here Insert Picture Description

  3. Select the right gear icon, click Add
    Here Insert Picture Description

  4. As shown below, select the virtual environment put the package folder, click OK
    Here Insert Picture Description

Small expand

  1. Requirements.txt install python with the command packet:

    pip install - r requirements.txt

  2. Generate requirements.txt command:

    pip freeze > requirements.txt

  3. Command-line switch virtual environment using git-bash.exe [Note that is the shell command line]

    source venv/Scripts/activate

  4. [Command-line tool is recommended to use git-bash.exe]

Guess you like

Origin blog.csdn.net/cai454692590/article/details/90268536