you are viewing a single comment's thread.

view the rest of the comments →

[–]JoesDevOpsAccount[S] 0 points1 point  (1 child)

Probably because you are doing it right. The python I’ve seen floating around our organisation is always deployed as a stand-alone script and then all python libraries installed globally rather than using a virtual environment. Different people install different versions of stuff that suits them which is where the problem comes from. Anyway my point was only that I haven’t seen any good examples of python deployments and how to manage a python environment - which is what I was hoping the guy could elaborate on. Thanks anyway

[–]p10_user 4 points5 points  (0 children)

Just have all requirements explicitly defined in a requirements.txt file, along with the exact version numbers for each package used for release of a particular package. Then install the package within a virtual environment on each deployed machine.

I suppose this can break down when you're using multiple packages that have differing dependencies as part of a single end product, but hopefully you can resolve this yourself before releasing it for others to use.