【发布时间】:2021-12-17 19:40:11
【问题描述】:
我正在使用 MAC Xcode 构建 Python KivyMD 应用程序,代码能够运行,但应用程序没有加载到 iphonesimulator 上。日志如下。
MAC - 大苏尔 Xcode - 13.1 Python - 3.8
2021-11-03 21:36:12.329967+1100 vocgo[9686:99184] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
2021-11-03 21:36:12.330145+1100 vocgo[9686:99184] Initializing python
2021-11-03 21:36:12.495467+1100 vocgo[9686:99184] Running main.py: /Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/YourApp/main.pyc
[INFO ] [Kivy ] v2.1.0.dev0
[INFO ] [Kivy ] Installed at "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.8.2 (default, Nov 1 2021, 20:29:50)
[Clang 13.0.0 (clang-1300.0.29.3)]
[INFO ] [Python ] Interpreter at "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/vocgo"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_imageio, img_tex (img_dds, img_sdl2, img_ffpyplayer, img_pil ignored)
[INFO ] [KivyMD ] 0.104.2, git-bc7d1f5, 2021-06-06 (installed at "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/kivymd/__init__.py")
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
2021-11-03 21:36:13.107136+1100 vocgo[9686:99184] Writing analzed variants.
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[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/xxxxxxxx/Library/Developer/Xcode/DerivedData/vocgo-fywrtcoideyfwrepueohqjxjodsj/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/Current/Foundation' (no such file), '/Users/xxxxxxxx/Downloads/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/xxxxxxxx/Library/Developer/Xcode/DerivedData/vocgo-fywrtcoideyfwrepueohqjxjodsj/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/C/Foundation' (no such file), '/Users/xxxxxxxx/Downloads/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/xxxxxxxx/Library/Developer/Xcode/DerivedData/vocgo-fywrtcoideyfwrepueohqjxjodsj/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/Current/Foundation' (no such file), '/Users/xxxxxxxx/Downloads/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 "/Users/xxxxxxxx/vocgo-ios/YourApp/main.py", line 7, in <module>
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/kivymd/uix/__init__.py", line 8, in <module>
from kivymd.uix.behaviors import SpecificBackgroundColorBehavior
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/kivymd/uix/behaviors/__init__.py", line 10, in <module>
from .backgroundcolor_behavior import (
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/kivymd/uix/behaviors/backgroundcolor_behavior.py", line 25, in <module>
from .elevation import CommonElevationBehavior
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/kivymd/uix/behaviors/elevation.py", line 364, in <module>
from PIL import Image, ImageDraw, ImageFilter
File "<frozen zipimport>", line 259, in load_module
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-11.6-x86_64.egg/PIL/Image.py", line 95, in <module>
File "<frozen zipimport>", line 259, in load_module
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-11.6-x86_64.egg/PIL/_imaging.py", line 7, in <module>
File "/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/5430FAEF-F9A3-46F7-B9D3-602717473C51/data/Containers/Bundle/Application/9CCC1550-5D8A-4DF7-8186-C052833273B0/vocgo.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-11.6-x86_64.egg/PIL/_imaging.py", line 6, in __bootstrap__
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 vocgo[9686:99184] Application quit abnormally!
我听说 KivyMD 在使用 Xcode 构建时仍然存在许多问题。我无法找到有关此错误的有价值的答案。我觉得我有不止一个问题。请阐明一些观点。非常感谢。
【问题讨论】:
-
我刚刚尝试在我的 iPad 上构建和运行一个非 KivyMD 应用程序——一个我已经使用了一年或更长时间的应用程序——并且遇到了类似的错误。所以它可能不仅仅是 KivyMD 应用程序。也使用 Big Sur Xcode 13.1 但 python 3.7
-
嗯,我的是 Python 3.8。你的有同样的成像 pyinit 错误吗? ImportError:动态模块没有定义模块导出函数(PyInit__imaging)