Python Forum
Best distribution method - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Best distribution method (/thread-40371.html)



Best distribution method - inovermyhead100 - Jul-19-2023

Hi all,
I have a general question about what the best way to distribute my projects. Essentially, I have a core application that runs in pretty much pure C++, and Im working on the data science side extending functionality by creating features (either web based using Flask, or by creating GUI applications) in Python. My question is whats the best practice to distribute these as part of our software?

Normally, I would just have one environment/venv containing all the libraries needed for each Python feature. However, since each feature requires different versions of python due to library incompatibilities, and other issues, I have created a venv for each feature and am distributing the Venv as well as a script to use the feature. My question is essentially is my current approach the best method, or should I think to bundle each feature into its own application/executable so that I dont have to worry about accessing the correct venv when wanting to use a specific feature? I know both approaches work, but I am not sure what best practice is or what is the best approach in terms of memory footprint. You can see a diagram below describing my current structure/workflow.


------Main CPP Application
|-----Python Feature 1 with venv 1 (contains python 3.10 for example)
|-----Python Feature 2 with venv 2 (contains python 3.9 for example)

The CPP application will directly called the python executable located in the virtual environment for each feature as well as the feature script itself.


Thanks a ton!!!!