toolchain Python(with Kivy) code -> Xcode iOS simulator -> "ModuleNotFoundError: No module named 'kivy'"

Viewed 654

I was trying to get an app that I programmed in Python using Kivy to run on an Xcode simulator. I followed these instructions from link seemingly without issues. Note: I have Kivy installed and use it within Anaconda / Spyder.

Running the Xcode project for the first time brought up the following error (the build didn't succeed):
in /Users/.../Documents/NR4/kivy-ios/dist/lib/libsdl2_image.a(IMG_bmp.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../Documents/NR4/kivy-ios/dist/lib/libsdl2_image.a' for architecture arm64

I solved this the following way: Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

When running the project now, I get the error:

ModuleNotFoundError: No module named 'kivy'

1 and the app crashes.

Thank you for taking the time to read through.

I would greatly appreciate help or ideas related to the problem.

1 Answers

Installing a newer version of Cython before building with toolchian resolved the problem for me.

pip3 install Cython==0.29.17
Related