Python Forum
No success with PyInstaller - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: No success with PyInstaller (/thread-8857.html)



No success with PyInstaller - j.crater - Mar-10-2018

Hello, it is my first time using PyInstaller. Please let me know if I am missing relevant information required to help.

I copied a very simple Kivy "Hello world" application to my PyCharm IDE (Windows 7, 64 bit). To test this program I made a project in PyCharm which uses venv. There I installed Kivy and PyInstaller. From PyCharm it runs with no problems, a window with "Hello world" text appears. It also works from Windows command prompt, if I activate the venv and run the program there.

From that same venv I run the PyInstaller to make an exe, following these instructions from Kivy website. The build succeeds, seemingly without errors. Unfortunately the result is not as desired. A console window opens and closes immediately. I managed to get the output and it says that the Kivy import fails - kivy module is not found.

What could be the problem? I can't figure what is the difference that makes the program run as expected from PyCharm or console, fails from PyInstaller exe. "venv\Lib\site-packages" in the "dist" directory made by PyInstaller contains the Kivy modules.

P.S.: I suspect the problem is not in Kivy, so I didn't put the thread in GUI subforum. If it is more appropriate it can be moved there.


RE: No success with PyInstaller - snippsat - Mar-10-2018

I can take it for a run when i get time.
Do Pyinstaller work for you for like standard hello world no GUI,or simple GUI with eg Tkinter?
You can look at theses post 1, 2, 3 as i have help some with Pyinstaller before.
I like to keep editors out of the Picture,only command line with stuff like this and a better one than cmd eg cmder.


RE: No success with PyInstaller - j.crater - Mar-10-2018

Thanks snippsat.
Eventually I somehow got it working. I added "paths" arguments in the command, pointing to "Lib" and "site-packages" (I think). And also some other tampering, which I can't recall what it was, but I suppose it was "paths" that did the trick.
Nevertheless, it is a bit frustrating to not understand (yet) how this process works.
Well, PyInstaller seems like a nice piece of software. And surely it takes some manual reading time to get the grip.
Note taken about the command line advice too =)