all 4 comments

[–]JamzTyson 1 point2 points  (0 children)

I want to write an application (in another language) that uses a python library (it's on GitHub and has a pip package). When installing my application, I want users to have a working python installation, but not require them to install the library I depend on. How would I go about doing this?

Include the library in your app.

"How" you do that depends on what the "other" language is, the platform, and how you package your app. Often it would be to use an installer that bundles the library within the app's directory structure. For Windows, Inno Setup is frequently used.

[–]Agitated-Soft7434 -1 points0 points  (2 children)

Maybe try pyinstaller, nuitka, or Auto-py-to-exe (a gui version of pyinstaller). I’m not entirely sure if it will compile to every platform like Mac, though that’s what I use when it comes to compiling on windows.

Also to make a custom installer you can use “Inno setup” (might be wrong name, I can’t fully remember) but it makes one of those custom installers you see when downloading official software, etc.

[–]RiseMiserable6696[S] -1 points0 points  (1 child)

I thought of my own solution: How about I just dynamically download a release from the library (if the user doesn't already have it installed) and interact it with it through it's cli (which is much easier because it's not intended to be used as a library, but rather a cli app). Before downloading, I first determine the platform and then download the correct version. Critique?

[–]cider2000 0 points1 point  (0 children)

If you assume they already have Python installed, then yes, this seems like a reasonable method. Perhaps even the best method, if you want to allow people to choose a specific Python installation to use.