This lesson covers how to create a virtual environment in a project folder. You learned that following the steps below will install a self contained Python environment in your project directory:
- Create a project directory
- Change into the project directory
- Run
python3 -m venv <name_of_virtualenv>
Charlie Grover on Sept. 11, 2021
I cannot activate using the responses up top of this post. I am running Python 3.9
In order to use this environment’s packages/resources in isolation, you need to “activate” it. To do this, just run the following:
$ source env/bin/activate (env) $
I have tried every combination of the python line to no avail. please help.