EDIT
One option I contemplated but don't know enough about is to e.g. for windows write a batch script to:
distutils
to also handle dependencies. It seems like this could be a relatively elegant and simple solution, but I'm not sure how to proceed - any ideas?
Original Question
In brief
What approach would you recommend for the following scenario?
wine
won't install windows version of Pythonjava
incurs large overhead because of existing code-baseBackground
I am writing technical and scientific apps under Linux but will need some of them to be deployable on Windows/MacOs machines too.
In the past I have used Python a lot, but I am finding that for non-technical users who aren't happy installing python packages, creating a simple executable (by using e.g. py2exe
) is difficult as I can't get the windows version of Python to install using wine
.
While java
would seem a good choice, if possible I wanted to avoid having to port my existing code from Python, especially as Python also allows writing portable code.
I realize I'm trying to cover a lot of bases here, so any suggestions regarding the most appropriate solutions (even if not perfect) will be appreciated.
I've got a project that sounds vaguely similar to what you're trying to do and I've seen some of the same problems since I usually develop on Linux and port to Windows. It's a Python + wxPython + NumPy + SciPy + matplotlib + assorted other packages, and what I've found to work best is to use PyInstaller. PyInstaller does an excellent job of handling third party Python packages and creates an EXE pretty painlessly.
I think if you're using py2exe or PyInstaller it more or less has to be done on Windows since IIRC there are a few Windows libs that have to come along for the ride. Maybe you could run a Windows EC2 instance? Depending on how complicated your application is, you might instead be able to make something work with Portable Python or PyPy.
I have tried downloading Python and required packages before for Windows boxes - it worked but it was always a little fragile. If you can find an installer builder that lets you specify dependencies (e.g. Advanced Installer-not free but works well), I'd try that first as it seems to be a little more robust.
py2exe works pretty well, I guess you just have to setup a Windows box (or VM) to be able to build packages with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With