by icebraining · 8y ago · 0 comments
pip install --target deps -r requirements.txt
Then running the application with PYTHONPATH=deps python myapp.py
This was also simple to integrate with service supervisors, since most make it easy to configure a environment variable. /hello/venvs/myproject/bin/python myscript.py
will run myscript.py exactly as if the virtualenv was active, which is easier to configure for cron jobs and services.