Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No success with PyInstaller
#1
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.
Reply
#2
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.
Reply
#3
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 =)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Identifying string success flag graham23s 4 3,051 Aug-14-2019, 09:27 PM
Last Post: graham23s
  Why does pyinstaller register success with py to exe, but? Pleiades 1 4,249 May-09-2018, 11:02 AM
Last Post: Pleiades
  FTP not downloading files but showing success python_lover 2 4,367 Jan-25-2017, 02:31 PM
Last Post: python_lover

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020