9 ms·
Using virtualenvs is standard practice when developing with Python. What the OP did will work with every standard Python installation out there. Most Python de
by heavyset_go 6y ago
Using virtualenvs is standard practice when developing with Python. What the OP did will work with every standard Python installation out there.
Most Python developers have virtualenv creation done for them via their IDE or scripts that vastly simplify the process so that you don't need to bother with the details in the OP.
- hal9000-tng 6y ago> .. standard practice .. when developing with Python development != deployment.
- heavyset_go 6y agoThey're standard for deployment, too.
- alexchamberlain 6y agoYou really don’t want to do that... they can break silently when the system updates Python. Use safe system wide installation for deployment, such as docker or traditional system packages. Alternatively, you can look at one of the many bunglers/static linkers like PyInstaller.
- heavyset_go 6y agoIdeally you'd deploy to a virtualenv in a container, recreating the virtualenv with each new image. You wouldn't update the system Python at all.
- hal9000-tng 6y ago> Ideally you'd deploy to a virtualenv in a container The whole point of a container is to isolate dependencies. The whole point of a virtualenv is also to isolate dependencies. If using a container, why bother with a virtualenv at all?