kivy-ios icon indicating copy to clipboard operation
kivy-ios copied to clipboard

ImportError: dynamic module does not define module export function (PyInit__imaging)

Open mpeguese opened this issue 4 years ago • 21 comments
trafficstars

Error: ImportError: dynamic module does not define module export function (PyInit__imaging)

  • Python : 3.9
  • MacOS version : Big Sur
  • XCode Version : 13.0
  • Cython version : 0.29.24

ISSUE/BACKGROUND: I am fairly new to python and attempting to create my first mobile app using KivyMD for iOS. I am able to get the application onto my iPhone but it crashes with the below error. It also fails on a Simulator as well with the exact same error. I have followed all the steps outlined in kivy-ios ReadMe. For reference I have placed my terminal commands below.

I found this same error in the following post but it wasn't clearly answered as to what causes this error. I also read several StackOverFlow posts and it appears to be a python2 vs python3 related error (Init being updated to PyInit with deprecation of PIL....or I could be wrong. Please correct me as I am still new to all this) but I am using a virtual environment and made sure only python 3 is installed. Can someone please help in advising what is causing this issue and how to go about fixing it?

ERROR: Error: ImportError: dynamic module does not define module export function (PyInit__imaging)

TERMINAL COMMANDS: brew install autoconf automake libtool pkg-config brew link libtool cd into local app directory () git clone https://github.com/kivy/kivy-ios.git cd kivy-ios/ python3 -m venv venv . venv/bin/activate pip install -e . pip install cython python3 toolchain.py build kivy python3 python3 toolchain.py create open projectname.xcodeproj

Xcode Build Logs 2021-09-26 18:52:40.097319-0400 bebo[77985:4400838] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown 2021-09-26 18:52:40.097557-0400 bebo[77985:4400838] Initializing python 2021-09-26 18:52:40.530238-0400 bebo[77985:4400838] Running main.py: /Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/YourApp/main.pyc [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/kivy/init.py" [INFO ] [Python ] v3.9.2 (default, Sep 24 2021, 20:14:03) [Clang 13.0.0 (clang-1300.0.29.3)] [INFO ] [Python ] Interpreter at "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/bebo" [INFO ] [Factory ] 186 symbols loaded [INFO ] [Image ] Providers: img_imageio, img_tex (img_dds, img_sdl2, img_ffpyplayer, img_pil ignored) [INFO ] [KivyMD ] 1.0.0.dev0 (installed at "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/kivymd/init.py") [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: sdl2 2021-09-26 18:52:43.620702-0400 bebo[77985:4400838] Writing analzed variants. [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used [INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0 APPLE-19.0.17'> [INFO ] [GL ] OpenGL vendor <b'Apple Inc.'> [INFO ] [GL ] OpenGL renderer <b'Apple Software Renderer'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <4096> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked Got dlopen error on Foundation: dlopen(/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 0x0001): tried: '/Users/MikesMac/Library/Developer/Xcode/DerivedData/bebo-divxpnhkpatmipasgnulhumpylxy/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/Current/Foundation' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file), '/Users/MikesMac/Library/Developer/Xcode/DerivedData/bebo-divxpnhkpatmipasgnulhumpylxy/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/C/Foundation' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file) Got fallback dlopen error on Foundation: dlopen(/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 0x0001): tried: '/Users/MikesMac/Library/Developer/Xcode/DerivedData/bebo-divxpnhkpatmipasgnulhumpylxy/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/Current/Foundation' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file), '/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file) Traceback (most recent call last): File "", line 44, in load_module File "/Users/MikesMac/ios-test/kivy-ios/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic File "", line 711, in _load File "", line 666, in _load_unlocked File "", line 565, in module_from_spec File "", line 1108, in create_module File "", line 228, in _call_with_frames_removed ImportError: dynamic module does not define module export function (PyInit_PIL__imaging)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/MikesMac/ios-test/kivy-ios/bebo-ios/YourApp/main.py", line 10, in File "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/kivymd/uix/init.py", line 8, in from kivymd.uix.behaviors import SpecificBackgroundColorBehavior File "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/kivymd/uix/behaviors/init.py", line 10, in from .backgroundcolor_behavior import ( File "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/kivymd/uix/behaviors/backgroundcolor_behavior.py", line 25, in from .elevation import CommonElevationBehavior File "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/kivymd/uix/behaviors/elevation.py", line 364, in from PIL import Image, ImageDraw, ImageFilter File "/Users/MikesMac/Library/Developer/CoreSimulator/Devices/91883F97-902C-41D8-BCA5-6F7CA24EEB27/data/Containers/Bundle/Application/90CB0A60-2777-4F62-A8DA-BB6E3A402CCB/bebo.app/lib/python3.9/site-packages/PIL/Image.py", line 114, in from . import _imaging as core File "", line 48, in load_module File "/Users/MikesMac/ios-test/kivy-ios/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic ImportError: dynamic module does not define module export function (PyInit__imaging) 2021-09-26 18:52:44.733397-0400 bebo[77985:4400838] Application quit abnormally! 2021-09-26 18:52:44.797039-0400 bebo[77985:4400838] Leaving

Screenshots screenshot_14

Additional context Add any other context about the problem here.

mpeguese avatar Sep 26 '21 23:09 mpeguese

i have same error

faris4017 avatar Sep 27 '21 06:09 faris4017

@faris4017 and @mpeguese, if you install your kivy-ios via pip, uninstall kivy-ios and try to install the latest version from Github using pip install git+https://github.com/kivy/kivy-ios.git after successful installation, build pillow and try it, that should work

garantor avatar Oct 13 '21 14:10 garantor

Same error too. Advice above didn't change the situation unfortunately.

takashonan avatar Oct 23 '21 04:10 takashonan

Same error I had. The same code can be published to Google play without problem. In Xcode I had this PyInit_imaging erorr. Can't make it work, help please!

File "/Users/xxxxxxxx/dist/root/python3/lib/python3.8/imp.py", line 342, in load_dynamic ImportError: dynamic module does not define module export function (PyInit__imaging) 2021-11-03 21:36:14.027017+1100 xxxxx[9686:99184] Application quit abnormally!

Jesscarlett avatar Nov 06 '21 10:11 Jesscarlett

Hi all, me again. I managed to overcome the issue. I posted it to stackoverflow. https://stackoverflow.com/questions/69824628/kivymd-xcode-build-error-importerror-dynamic-module-does-not-define-module-ex/70080251#70080251

Jesscarlett avatar Nov 23 '21 11:11 Jesscarlett

@Jesscarlett this is due to #606. The kivy-ios version available on PyPI is 1.2.1, which doesn't include that patch, unlike the current master version which includes it.

I'm closing this issue, cause should be fixed via #606. But feel free to reopen if needed.

misl6 avatar Nov 23 '21 12:11 misl6

This is not working for me. Same error, no solution worked for me.

AD0T-dev avatar Nov 29 '21 15:11 AD0T-dev

Please could you reopen the issue?. My recipes shows "pillow 8.2.0" as follows:

[INFO ] Using the bundled version for recipe 'audiostream' audiostream master
[INFO ] Using the bundled version for recipe 'click' click 7.1.2
[INFO ] Using the bundled version for recipe 'curly' curly master
[INFO ] Using the bundled version for recipe 'cymunk' cymunk master
[INFO ] Using the bundled version for recipe 'ffmpeg' ffmpeg n4.3.1
[INFO ] Using the bundled version for recipe 'ffpyplayer' ffpyplayer 4.2.0
[INFO ] Using the bundled version for recipe 'flask' flask 1.1.2
[INFO ] Using the bundled version for recipe 'freetype' freetype 2.5.5
[INFO ] Using the bundled version for recipe 'host_setuptools' [INFO ] Using the bundled version for recipe 'host_setuptools3' host_setuptools3 59.2.0
[INFO ] Using the bundled version for recipe 'hostopenssl' hostopenssl 1.1.1l
[INFO ] Using the bundled version for recipe 'hostpython3' hostpython3 3.9.9
[INFO ] Using the bundled version for recipe 'ios' ios master
[INFO ] Using the bundled version for recipe 'itsdangerous' itsdangerous 1.1.0
[INFO ] Using the bundled version for recipe 'jinja2' jinja2 2.11.2
[INFO ] Using the bundled version for recipe 'kivent_core' kivent_core master
[INFO ] Using the bundled version for recipe 'kivy' kivy b5ec51ed2315a9a890f264b0df6d23c8e6341d42 [INFO ] Using the bundled version for recipe 'libcurl' libcurl 7.65.3
[INFO ] Using the bundled version for recipe 'libffi' libffi 3.2.1
[INFO ] Using the bundled version for recipe 'libjpeg' libjpeg v9d
[INFO ] Using the bundled version for recipe 'libpng' libpng 1.6.26
[INFO ] Using the bundled version for recipe 'libzbar' libzbar 0.10
[INFO ] Using the bundled version for recipe 'markupsafe' markupsafe 1.1.1
[INFO ] Using the bundled version for recipe 'netifaces' netifaces 0.10.9
[INFO ] Using the bundled version for recipe 'numpy' numpy 1.20.2
[INFO ] Using the bundled version for recipe 'openssl' openssl 1.1.1l
[INFO ] Using the bundled version for recipe 'photolibrary' photolibrary master
[INFO ] Using the bundled version for recipe 'pillow' pillow 8.2.0
[INFO ] Using the bundled version for recipe 'plyer' plyer master
[INFO ] Using the bundled version for recipe 'pycrypto' pycrypto 2.6.1
[INFO ] Using the bundled version for recipe 'pykka' pykka 1.2.1
[INFO ] Using the bundled version for recipe 'pyobjus' pyobjus master
[INFO ] Using the bundled version for recipe 'python3' python3 3.9.9
[INFO ] Using the bundled version for recipe 'pyyaml' pyyaml 3.11
[INFO ] Using the bundled version for recipe 'sdl2' sdl2 7cc4fc886d9e [INFO ] Using the bundled version for recipe 'sdl2_image' sdl2_image 2.0.4
[INFO ] Using the bundled version for recipe 'sdl2_mixer' sdl2_mixer 2.0.4
[INFO ] Using the bundled version for recipe 'sdl2_ttf' sdl2_ttf 2.0.15
[INFO ] Using the bundled version for recipe 'werkzeug' werkzeug 1.0.1
[INFO ] Using the bundled version for recipe 'zbarlight' zbarlight 1.2

But the error remains:

2021-12-09 13:58:18.929588+0100 mytest[467:13831] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown 2021-12-09 13:58:18.929752+0100 mytest[467:13831] Initializing python 2021-12-09 13:58:19.093802+0100 mytest[467:13831] Running main.py: /private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/YourApp/main.pyc [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/kivy/init.py" [INFO ] [Python ] v3.9.9 (main, Dec 8 2021, 10:46:27) [Clang 13.0.0 (clang-1300.0.29.3)] [INFO ] [Python ] Interpreter at "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/mytest" [INFO ] [KivyMD ] 0.104.2, git-bc7d1f5, 2021-06-06 (installed at "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/kivymd/init.py") [INFO ] [Factory ] 186 symbols loaded [INFO ] [Image ] Providers: img_imageio, img_tex, img_sdl2 (img_dds, img_ffpyplayer, img_pil ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: sdl2 2021-12-09 13:58:20.440892+0100 mytest[467:13831] Metal GPU Frame Capture Enabled 2021-12-09 13:58:20.443206+0100 mytest[467:13831] Metal API Validation Enabled [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used [INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0 Metal - 94.5'> [INFO ] [GL ] OpenGL vendor <b'Apple Inc.'> [INFO ] [GL ] OpenGL renderer <b'Apple A10 GPU'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <4096> [INFO ] [GL ] Texture max units <8> 2021-12-09 13:58:21.740070+0100 mytest[467:13831] fopen failed for data file: errno = 2 (No such file or directory) 2021-12-09 13:58:21.740188+0100 mytest[467:13831] Errors found! Invalidating cache... 2021-12-09 13:58:21.755709+0100 mytest[467:13831] fopen failed for data file: errno = 2 (No such file or directory) 2021-12-09 13:58:21.755820+0100 mytest[467:13831] Errors found! Invalidating cache... [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked Got dlopen error on Foundation: dlopen(/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 0x0001): tried: '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file) Got fallback dlopen error on Foundation: dlopen(/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 0x0001): tried: '/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (no such file) Traceback (most recent call last): File "", line 44, in load_module File "/Users/jose/Documents/kivy-ios/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic File "", line 711, in _load File "", line 666, in _load_unlocked File "", line 565, in module_from_spec File "", line 1173, in create_module File "", line 228, in _call_with_frames_removed ImportError: dynamic module does not define module export function (PyInit_PIL__imaging)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/jose/Documents/kivy-ios/mytest-ios/YourApp/main.py", line 2, in File "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/kivymd/uix/init.py", line 8, in from kivymd.uix.behaviors import SpecificBackgroundColorBehavior File "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/kivymd/uix/behaviors/init.py", line 10, in from .backgroundcolor_behavior import ( File "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/kivymd/uix/behaviors/backgroundcolor_behavior.py", line 25, in from .elevation import CommonElevationBehavior File "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/kivymd/uix/behaviors/elevation.py", line 364, in from PIL import Image, ImageDraw, ImageFilter File "/private/var/containers/Bundle/Application/059A117F-2CEF-45F2-9CEF-99E7E7D4E0D6/mytest.app/lib/python3.9/site-packages/PIL/Image.py", line 109, in from . import _imaging as core File "", line 48, in load_module File "/Users/jose/Documents/kivy-ios/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic ImportError: dynamic module does not define module export function (PyInit__imaging) 2021-12-09 13:58:22.617827+0100 mytest[467:13831] Application quit abnormally! 2021-12-09 13:58:22.662719+0100 mytest[467:13831] Leaving

jjosecarmona avatar Dec 09 '21 11:12 jjosecarmona

HI @jjosecarmona and @K1NGC0D3R ,

I probably already suggested this fix to @K1NGC0D3R on Discord, but I'm not sure about the result.

Has Pillow been built after the code project creation?

If yes, did you updated the project accordingly via toolchain update PATH/TO/YOUR.xcodeproj ?

If toolchain update ... doesn't works, what happens if you manually add libpillow.a to your General->Frameworks, Libraries, and Embedded Content Xcode tab?

misl6 avatar Dec 09 '21 20:12 misl6

When I manually added libpillow.a

Xcode is now crashing after compiling

AD0T-dev avatar Dec 10 '21 05:12 AD0T-dev

I fixed the crashing

But now new error

ImportError: The _imaging extension was built for another version of Pillow or PIL: Core version: 8.2.0 Pillow version: 8.4.0 2021-12-10 11:27:05.355568+0530 bmicalc[8063:321372] Application quit abnormally! 2021-12-10 11:27:05.402427+0530 bmicalc[8063:321372] Leaving

AD0T-dev avatar Dec 10 '21 05:12 AD0T-dev

I have fixed my error

Thank you

AD0T-dev avatar Dec 10 '21 07:12 AD0T-dev

After some investigation on Discord, with a user that had the same issue, we came to a conclusion:

If Pillow (and could happen with other dependencies that actually need a recipe to build) is not built via toolchain build pillow before a dependant (Like kivymd) is installed via toolchain pip install ...., a non-recipe version of the dependency gets incorrectly installed.

That could lead to the issue that has been reported here.

As a workaround, until it get fixed, the following approach should be followed (I'm using as an example the specific kivymd case, but applies to others):

  • toolchain build python3 kivy
  • toolchain build pillow
  • toolchain pip install kivymd

misl6 avatar Dec 16 '21 19:12 misl6

I don't use this project, but I searched everywhere and this is one of the most active issues for this error, so I thought I'd comment.

I resolved this error by using python3.9

lapp0 avatar Jan 03 '22 21:01 lapp0

@misl6 I had the same issue any fixing?

Regards,

saminapoleon avatar Feb 04 '22 17:02 saminapoleon

good morning all

  I have the same issue and I tried all the solution above with no hop can any one provide me the right steps to over come this issue?

MacOs:big sur running on VM

Issue:

ImportError: dynamic module does not define module export function (PyInit__imaging) 2022-02-04 22:06:38.477149-0800 ios-app[26728:720920] Application quit abnormally!

hope to hear from you soon thanks in advance...

saminapoleon avatar Feb 05 '22 06:02 saminapoleon

After some investigation on Discord, with a user that had the same issue, we came to a conclusion:

If Pillow (and could happen with other dependencies that actually need a recipe to build) is not built via toolchain build pillow before a dependant (Like kivymd) is installed via toolchain pip install ...., a non-recipe version of the dependency gets incorrectly installed.

That could lead to the issue that has been reported here.

As a workaround, until it get fixed, the following approach should be followed (I'm using as an example the specific kivymd case, but applies to others):

  • toolchain build python3 kivy
  • toolchain build pillow
  • toolchain pip install kivymd

@saminapoleon Did you tried to follow these instructions? (From a clean dist)

misl6 avatar Feb 05 '22 08:02 misl6

@misl6 hi and many thanx for your response, what did you mean (From a clean dist)? also I tried these

toolchain build python3 kivy
toolchain build pillow
toolchain pip install kivymd

but with no hope.

anything else must done?

Regards,

saminapoleon avatar Feb 05 '22 10:02 saminapoleon

@misl6 I followed the instructions and now I have this issue any idea?

AttributeError: module 'subprocess' has no attribute 'Popen'

Regards

saminapoleon avatar Feb 05 '22 16:02 saminapoleon

Are you using "subprocess" in your App? If "yes", see: https://github.com/kivy/kivy-ios#why-does-the-python-multiprocesssubprocess-module-not-work

If you need some help or support, please join our Discord Server

misl6 avatar Feb 05 '22 16:02 misl6

@misl6

no im not using subprocess that is why im hanged out.

about discord I can not send any message I have no permission

Regards,

saminapoleon avatar Feb 05 '22 16:02 saminapoleon

Just to get a few details out of the way, I'm running the latest kivy-ios pulled from github.

Name: kivy-ios Version: 2023.5.21

I'm having a lot of issues getting Pillow to work. Unlike most, I'm not using kivyMD. I'm using pillow to draw text onto an image. When I compile it with kivy on my m1 macbook pro, everything works great using:

  • Python 3.11.4
  • Pillow 10.0.0.

With kivy-ios, this is what I've tried:

toolchain build python3 kivy toolchain build pillow

That gives the following error:

407 duplicate symbols for architecture arm64 Linker command failed with exit code 1 (use -v to see invocation)

Now if If I "pip install pillow" instead of using "toolchain build pillow", which will give me pillow 10.0.0 instead of pillow the 8.2 given in toolchain:

File "/Users/username/Desktop/dist/root/python3/lib/python3.10/imp.py", line 343, in load_dynamic ImportError: dynamic module does not define module export function (PyInit__imaging)

Any suggestions? Only other library I need is pymysql which pip installs just fine. It's just Pillow that's creating issues.

lukebelz avatar Jul 16 '23 18:07 lukebelz

I think I might have found something:

toolchain pip uninstall pillow
toolchain clean pillow
toolchain build pillow

This downgraded pillow to the working version.

tomasemilio avatar Jul 18 '23 18:07 tomasemilio

I have fixed my error

Thank you

How did you fixed it please

abdul-yusuf avatar Dec 08 '23 20:12 abdul-yusuf

This is a support issue with three fixes proposed above.

Closing as there is no work to be done by Kivy developers.

Julian-O avatar Dec 08 '23 23:12 Julian-O