- Create venv
$ python3 -m venv env
- Activate venv
$ source env/bin/activate
- (Optional) Check that the correct python env is being used
$ which python
> .../explore-python-pm/pip-virtualenv/env/bin/python
- Install all dependencies
$ pip install -r requirements.txt
- Install the dependency using pip
$ pip install <package-name>
-
Do for all other new dependencies
-
Save to requirements.txt
$ pip freeze > requirements.txt
- Deactivate venv
$ deactivate
$ python -m pip install -U pip