General Python Stuff - TwoGears/hakomo-guides GitHub Wiki

Python

How to check current version that is running in terminal:

python --version

How to check all version installed on mac:

which -a python python2 python2.7 python3 python3.6

By default python/pip commands points to the first binary found in PATH environment variable depending what's actually installed

PIP

To check if pip is installed:

pip --version

Install pip

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py then python get-pip.py

create Env

py -m venv env where env is the name of the environment

Activating Env

source env/bin/activate

Installing

pip install -r requirements.txt from the folder where the requirements.txt file is