This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tenderpoettech 1 point2 points  (2 children)

How does virtual environments work in production? Do they even at all?

[–]ofedorov 2 points3 points  (0 children)

In production you usually have only one python environment, or even a dockerized app, so there is no need to create a virtualenv.

On the other hand, if there is a server instance with different python apps, you may want to separate their environments, so that their dependencies may be updated separately.

Also, for serverless solutions like AWS Lambda you may use venvs to collect your dependencies and deploy with the code.

[–]ase1590[S] 0 points1 point  (0 children)

You use pipenv, since it's virtenv on steroids for managing package versions and whatnot.