Okay so I'm a complete noob in programming and I'm trying to compile a simple program I wrote that takes in a string and prints out the string in morse code it's called morse.py. I installed pyinstaller using
pip install pyinstaller
and I am trying to compile my program using pyinstaller.
Now I've searched a bit and it says that I need to write pyinstaller morse.py, but I don't really know where to write that. I tried moving to the directory of my program and doing that in CMD but it didn't work. I tried making a python program in the same directory and doing that and that also didn't work. I couldn't find anything very helpful to tell me exactly how to compile the file.
Can someone please help?
To your users, the app is self-contained. They do not need to install any particular version of Python or any modules. They do not need to have Python installed at all. The output of PyInstaller is specific to the active operating system and the active version of Python.
To install PyInstaller: Go to your command prompt (Start -> Run -> cmd) type the following command cd c:\python27\scripts press enter, this should be where your pip.exe file is located. Once you are in this directory type pip install pyinstaller press enter.
I would suggest to first read the Using Pyinstaller section in the documentation of the module itself.
You can also use some tutorials (e.g. Matt Borgerson's one).
In order to recap you should:
run from the command line:
~\ pyinstaller your_file_name.py
this command will generate a your_file_name.spec file where you can include all the dll required by your application and any custom settings (Using Spec Files)
once you have decided what to include in your .exe application you can run from the command line
~\ pyinstaller [option1] [option2] your_file_name.py
You can find the full list the options in the documentation. An example could be pyinstaller.exe --onefile --windowed --icon=app.ico app.py where:
You can create your exe file very easily also with py2exe.
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