E.T. E.T. - 1 year ago 101
Python Question

No module named kivy.tools.packaging.pyinstaller_hooks

I'm following Kivy's Windows-packaging guide.
I'm at the last step, building the spec, and I get the following error:

ImportError: No module named kivy.tools.packaging.pyinstaller_hooks


I'm using Python 2.7.5, the Kivy 1.7.2 for Windows, and the PyInstaller 2.1.
All previous steps of the guide work.
For this guide, I'm packaging up my Pong game, which I made using Kivy's Pong game tutorial.
I stopped the tutorial at the point where the ball is only bouncing around, but it's technically a working program using Kivy, so it should be good enough to practice packaging.

I've looked at this post in the Kivy support area, and it doesn't help.
(The files listed in that post as being missing, are present in my Kivy download.)

Where do I find the module in the error message, and how to I tell PyInstaller where to find it?

Answer Source

Running kivy.bat before running pyinstaller.py will fix the error.

This batch file sets the appropriate paths, so that pyinstaller knows where to find Kivy. This step is listed in the tutorial; It is essential that no steps are missed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download