PYTHONPATH Considered Harmful
(Thanks to Tim D. Smith and Augie Fackler for reviewing a draft. Any mistakes that remain are mine.)
The environment variable
PYTHONPATH seems harmless enough.
The official documentation refers to its function as
"Augment the default search path for module files."
However, in practice, setting this variable in a shell …
Shipping Python Applications in Docker
When looking in open source examples, or tutorials, one will often see Dockerfiles that look like this:
FROM python:3.6 COPY setup.py /mypackage COPY src /mypackage/src COPY requirements.txt / RUN pip install -r /requirements.txt RUN pip install /mypackage ENTRYPOINT ["/usr/bin/mypackage-console-script", "some", "arguments"]