Mar-10-2018, 02:09 PM
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.
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.