Skip to content

Latest commit

 

History

History

pip-virtualenv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

pip & virtualenv

Setup

  1. Create venv
$ python3 -m venv env
  1. Activate venv
$ source env/bin/activate
  1. (Optional) Check that the correct python env is being used
$ which python
> .../explore-python-pm/pip-virtualenv/env/bin/python
  1. Install all dependencies
$ pip install -r requirements.txt

Adding & Saving Dependencies

  1. Install the dependency using pip
$ pip install <package-name>
  1. Do for all other new dependencies

  2. Save to requirements.txt

$ pip freeze > requirements.txt

Teardown

  1. Deactivate venv
$ deactivate

Updating pip

$ python -m pip install -U pip