Skip to content

Using Pip

Timothy Ko edited this page Dec 25, 2018 · 5 revisions

Using Pip

We must use pip and virtualenv separately. Always remember to use the same virtual environement!!!! This is a good practice for any python development.

Then, install virtualenv, create and activate the environment called venv:

$ pip3 install virtualenv
$ virtualenv -p python3 venv
$ source venv/bin/activate

You will then have a (venv) before the $, meaning that you are now in your virtual environment. Then, install the python package dependencies, which include Flask.

(venv)$ pip install -r requirements.txt
(venv)$ pip install -r requirements-dev.txt

To deactivate when you're using it:

(venv)$ deactivate venv

If you are using pip, your command line will have (venv)$ in front. Now look above for instructions to run the server.