Frage

So far I have tried bbfreeze, cx_freeze, py2exe and pyInstaller with no success.

All I want to do is to make the Python script into an executable so that others can see my work without needing to install Python.

And if I have to install any of these that I have listed above, what do I do with the files?

War es hilfreich?

Lösung 3

For this you have two choices:

A downgrade to python 2.6. This is generaly undesirable because it is backtracking and may nullify a small portion of your scripts.

Your second option is to use some form of exe converter. I recommend pyinstaller as it seems to have the best results.

Andere Tipps

Those solutions (probably) won't work under Linux. Possibly with WINE, but I'm not sure about that.

If you just want to share the output of the script, you might look at using Flask or some other web framework to host the script. You can display the output however you'd like.

Alternatively, you could provide Portable Python or have the recipients download and install Python

While some of those scripts are available on Linux, I don't think you can actually build an exe for Windows using it on Linux. So instead, you should create the executable on a machine with the OS you are targeting. Then you can create an installer with Inno Setup (or similar) to make it very easy for the end user to install. Here are a couple of articles I wrote on the process:

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top