kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
776 stars 240 forks source link

PyObjC import error #741

Closed harshith7823 closed 11 months ago

harshith7823 commented 2 years ago

Versions

Describe the bug Facing 'dynamic module does not define module export function (PyInit__objc)' error while trying to import the PyObjC library in Kivy app

To Reproduce I installed the PyObjC library in my kivy env( https://pyobjc.readthedocs.io/) using toolchain pip install pyobjc. After that, I added the 'import objc' in main.py, built the iOS app, and ran it on my device only to end up with dynamic module does not define module export function (PyInit__objc) error. I am not facing issues with the pyobjus library(kivy's objc-python bridge) but I want to use PyObjC in my project for legacy reasons. Does anyone have a clue why this might be happening? Any help would be much appreciated! Thank you

Logs


File "/Applications/kivy-app.app/lib/python3.9/site-packages/CoreFoundation/__init__.py", line 9, in <module>
     import objc
   File "/Applications/kivy-app.app/lib/python3.9/site-packages/objc/__init__.py", line 6, in <module>
     from . import _objc
   File "<string>", line 48, in load_module
   File "/Users/harshith/my_kivy_project/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic
 ImportError: dynamic module does not define module export function (PyInit__objc)
2022-08-10 12:21:13.879471-0700 kivy-app[2965:128604] Application quit abnormally!
2022-08-10 12:21:13.886457-0700 kivy-app[2965:128604] Leaving```
github-actions[bot] commented 11 months ago

👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

If you're having trouble installing or using kivy-ios, maybe you could be interested to installation and requirements.

Let us know if this comment was made in error, and we'll be happy to reopen the issue.