Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildozer error: no module named kivy #1354

Closed
thegameguy opened this issue Sep 5, 2018 · 7 comments
Closed

buildozer error: no module named kivy #1354

thegameguy opened this issue Sep 5, 2018 · 7 comments

Comments

@thegameguy
Copy link

Hi, I'm using p4a master, cython==0.25, kivy==1.10.1 and python 2.7, I keep getting an error while debugging an apk, 'no module named kivy'.

Details of error are in the log below. thanks!
log: https://pastebin.com/U2UvzsKE
buildozer.spec: https://pastebin.com/Qi2JGVDG

@AndreMiras
Copy link
Member

Relevant part of the logs:

[INFO]:    Installing kivent_core into site-packages
[INFO]:    -> directory context /home/vapo/test5/.buildozer/android/platform/build/build/other_builds/kivent_core-python2/armeabi-v7a/kivent_core/modules/core
[INFO]:    -> running hostpython setup.py install -...(and 131 more)
Exception in thread background thread for pid 3847:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/vapo/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/home/vapo/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/vapo/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
ErrorReturnCode_1:
 
  RAN: /home/vapo/test5/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/hostpython setup.py install -O2 --root=/home/vapo/test5/.buildozer/android/platform/build/build/python-installs/myapp2 --install-lib=lib/python2.7/site-packages
 
  STDOUT:
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    import kivy
ImportError: No module named kivy

I've never played with kivent_core in the requirements. But yes as of today, it seems like your hostpython2 has a requirement over kivy here: https://github.com/kivy/kivent/blob/29dba81/modules/core/setup.py#L4

@thegameguy
Copy link
Author

Thanks for the reply what do you suggest I should do, I have kivy installed on the system, I have been building apks without kivent installed on linux side.

@thegameguy
Copy link
Author

does it has to do with the recipes. I have touched the recipes with p4a that came with the kivent_core, kivent_cymunk and kivent_particles. The p4a master files has a recipes folder. A whole bunch of recipes has these three too. but there is just init.py files in them. The recipes i touched with p4a were manually downloaded from here: https://github.com/kivy/kivent/tree/29dba8181ad855e0aca181f6a9e5b3d12d5bb0ca/modules/recipes

@thegameguy
Copy link
Author

thegameguy commented Sep 5, 2018

found a solution
is to copy kivy and cymunk installation folders from
/home/usermachine/test/.buildozer/android/platform/build/build/python-installs/myapp/lib/python2.7/site-packages
to
/home/usermachine/test/.buildozer/anroid/platform/build/build/other_builds/ hostpython2/desktop/hostpython2/lib/site-packages
note: the addressed may vary, basically we need to copy kivy and cymunk installations from python site packages to hostpython2 sitepackages.

@AndreMiras
Copy link
Member

Glad you got it working, but it's still a bug right? I don't know if something could be done from the recipe.

@thegameguy
Copy link
Author

yes true, if a recipe could shutil the folders from one site package to another.

@thegameguy thegameguy reopened this Sep 5, 2018
@thegameguy
Copy link
Author

upgrading to master version of buildozer solves the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants