Python - rulebook

Fortunately or not, python is unavoidable. So we need some rules to keep ourselves sane while using it.

XDG and home dir

First, let’s remove the clutter:

Virtual environments

You must use virtual environments for all your python development. It is not optional.

$ python -m venv env
$ source env/bin/activate.fish # depending on the shell of choice
$ pip install number # e.g.
$ pip freeze > requirements.txt # to list all dependencies and their version into a file
$ pip install -r requirements.txt # to install all required dependencies
Previous I'm feeling lucky! Next