-1

Can someone please help me explain this? I've been trying to convert my py program (python 3.5) to an exe and I just can't seem to figure it out. I downloaded PyInstaller but I don't really know what to do from here.

I'm on a Mac using OS X El Capitan.

Image

halfer
  • 19,824
  • 17
  • 99
  • 186
Jamey Cane
  • 11
  • 3
  • What I'm referring to when I say, "can someone please help me understand this?" is the blue number 1 that is at the end of my post. That is a link to a screenshot in the PyInstaller manual that I cannot understand. It is like that because I am not allowed to post pictures here yet. – Jamey Cane Mar 08 '16 at 06:55
  • Could you please include the code used, preferably as text and not a screenshot and the error message as text here? – Torxed Mar 08 '16 at 07:06
  • there is no error message. I literally just don't know what to do. Maybe I'm just being dumb, but I don't understand what they mean by this. And the code is very very long. It has a bunch of print statements in it so it will not fit here in text form. – Jamey Cane Mar 08 '16 at 07:11
  • I probably should have said this earlier, but I am very new to this. I have no have very little understanding of what is going on, and I could not follow what they were asking me to do in that manual. – Jamey Cane Mar 08 '16 at 07:12
  • You literally just have to do `pyinstaller --onefile --windowed GUI_App.py` and you're done. – Torxed Mar 08 '16 at 07:12
  • Where do I put that? At the top of the python code? In the Terminal? ...whatever that is lol – Jamey Cane Mar 08 '16 at 07:14
  • Jamey, you **really** need to learn how to google this. And learn that you won't break anything by testing things out. I mean how hard is it to open a terminal and put whatever i wrote in a terminal? it won't frickin' bite you you know.. And who knows, maybe you'll get a result without anyone telling you how it works? **Try things out, that's how you learn**. – Torxed Mar 08 '16 at 07:15
  • ... ok, thanks for your help then. Have a nice day. – Jamey Cane Mar 08 '16 at 07:18
  • 1
    I'm voting to close this on the basis that you havn't tried anything yourself (which is a requirement in the FAQ) but also because this literally is explain in the first google-hit I got. I'm not trying to be rude, i'm simply trying to get everyone asking the most basic introduction questions to learn how to gather information. It's been asked before (see my source list) and it's also on every guide on the internet. They clearly states `in a terminal, write pyinstaller ...`. It might sound harsh but really it's stairing you in the face this time. – Torxed Mar 08 '16 at 07:19

1 Answers1

2

To use pyinstaller, all you need to do is open a console and execute:

pyinstaller --onefile --windowed gui_app.py

Or if it's a console-application, you simply do:

pyinstaller --onefile app.py

If it's a simple application you can even do:

pyinstaller app.py

That's it, you need to make sure pyinstaller is installed and in your path tho, because this is an application in itself. On Windows it's called pyinstaller.exe and resides in your Windows PATH variable.

If you've got a more complicated application you can build a definition list and give that to pyinstaller to read (add icons, version number etc etc). But most of the time you won't need that.

Sources:

Community
  • 1
  • 1
Torxed
  • 22,866
  • 14
  • 82
  • 131