Create a new virtual environment in that folder and activate that environment:
python -m venv .venv
When you run the command above, a directory called
.venv will appear in
myproject/. This directory is where your virtual environment and its dependencies are installed.
Any time you want to use the new environment, you first need to go to your project folder (where the .venv directory lives) and run:
When you’re done using this environment, type
deactivateto return to your normal shell.