Creating python script executable in python 2.7

We are trying to make our python script run as an .exe file without installing python. For example, if we transfer our program to someone else, they will not need to install python to open it.

This is a text game such as zork, so you need gui to run it, for example cmd.

We tried using py2exe and pyinstaller, but none of them made any sense and for some reason does not work with 2.7.3.

Any help?

+4
source share
4 answers

You can always try http://cx-freeze.sourceforge.net , it works with all versions of python, including 3.3.

+2
source

Check out this wiki when deploying Python applications:

http://wiki.python.org/moin/deployment

In addition to the already mentioned, it has links to Movable Python, Python-Packager and others.

+1
source

Assuming you have the protocol installed, which you should after installing Python inside the Scripts folder. Install PyInstaller using pip, enter the following at a command prompt.

  • pip install pyinstaller

After installing PyInstaller, find the pyinstaller file files (they should be where the pip files are inside the Scripts folder) and go to the command line and enter the following.

  • c: \ python27 \ Scripts> pyinstaller --onefile c: \ yourscript.py

The above command will create a folder called dist in the Scripts folder, this will contain one executable file "yourscript.exe".

+1
source

All Articles