Hacker News new | ask | show | jobs
by alexchamberlain 2104 days ago
You 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.
1 comments

Ideally 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.
> 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?