by ProblemFactory · 12y ago · 0 comments
If you provide the full path to the python binary in the virtualenv, it executes with the virtualenv loaded:
/home/acjohnson/virtualenvs/foo/bin/python myscript.py
This is useful for crontabs, system service config, etc. which don't load a regular user's bash setup files.