Kivy Garden in PyInstaller - stuck trying to trace import
Question: I have a Kivy-based Python project that I'm trying to build. It uses the
NavigationDrawer component from Kivy Garden, through an import:

> from kivy.garden.navigationdrawer import NavigationDrawer

I have a PyInstaller spec file for it which builds a distributable version.
This version works well on my machine, but unfortunately not on other
machines. Running the interpreter in the 'dist' version with the -v switch, it
appears that when I run the distributable on my machine, the navigationdrawer
component is not actually coming from inside my build folder. All the other
imports show something like:

> import kivy.graphics.gl_instructions # dynamically loaded from
> C:\Users\me\myapp\dist\RACECA~1\kivy.graphics.gl_instructions.pyd

But the navigationdrawer import says:

> import kivy.garden.navigationdrawer
>
> """directory C:\Users\me\\.kivy\garden\garden.navigationdrawer
> C:\Users\me\\.kivy\garden\garden.navigationdrawer\\__init__.pyc matches
> C:\Users\me\\.kivy\garden\garden.navigationdrawer\\__init__.py import
> kivy.garden.navigationdrawer # precompiled from
> C:\Users\me\\.kivy\garden\garden.navigationdrawer\\__init__.pyc"""

But noo! I don't want you to import them from c:\users. I want them to get
nicely copied into my dist folder like all the other imports. I've tried
adding c:\users\me to PyInstaller's pathex, the system PATH and PYTHONPATH
without any joy. Anyone have any ideas?


Answer: Try installing your garden packages into your app. i.e.

    
    
    garden install --app navigationdrawer
    

This will create a libs/garden folder inside the current directory and place
the garden packages in there, which should make it easier to include.

