iOS Development

python – Easy methods to repair this numpy error ? please assist me

Spread the love


I created an utility that works very nicely on Android however now I wish to make it for iPhones.

The issue is that I’ve an error when launching the appliance within the Xcode emulator.

I will provide the full log file

Logs :

2024-01-04 14:45:51.690055+0100 myapp[72202:753867] Out there orientation: KIVY_ORIENTATION=Portrait
2024-01-04 14:45:51.690314+0100 myapp[72202:753867] Initializing python
<string>:1: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removing in Python 3.12; see the module's documentation for various makes use of
2024-01-04 14:45:52.116725+0100 myapp[72202:753867] Working most important.py: 
/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/YourApp/most important.pyc
[INFO   ] [Logger      ] File log in 
/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Knowledge/Utility/54E64709-1E9F-4C5C-85AF-9B21DFDFCFF0/Paperwork/.kivy/logs/kivy_24-01-04_6.txt
[INFO   ] [Kivy        ] v2.2.1
[INFO   ] [Kivy        ] Put in at 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.10.10 (most important, Jan  4 2024, 13:55:56) [Clang 13.1.6 (clang-1316.0.21.2.5)]
[INFO   ] [Python      ] Interpreter at 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/myapp"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge completed!
[INFO   ] [Factory     ] 190 symbols loaded
[INFO   ] [Image       ] Suppliers: img_imageio, img_tex, img_sdl2 (img_dds, img_ffpyplayer, img_pil ignored)
[INFO   ] [Window      ] Supplier: sdl2
2024-01-04 14:45:53.796902+0100 myapp[72202:753867] You want UIApplicationSupportsIndirectInputEvents in your Information.plist for mouse help
[INFO   ] [GL          ] Utilizing the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL model <b'OpenGL ES 2.0 APPLE-19.4.3'>
[INFO   ] [GL          ] OpenGL vendor <b'Apple Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'Apple Software program Renderer'>
[INFO   ] [GL          ] OpenGL parsed model: 2, 0
[INFO   ] [GL          ] Shading model <b'OpenGL ES GLSL ES 1.00'>
[INFO   ] [GL          ] Texture max measurement <4096>
[INFO   ] [GL          ] Texture max items <8>
[INFO   ] [Window      ] auto add sdl2 enter supplier
[INFO   ] [Window      ] digital keyboard not allowed, single mode, not docked
[INFO   ] [KivyMD      ] 1.1.1, git-Unknown, 2024-01-04 (put in at 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/kivymd/__init__.py")
[INFO   ] [Text        ] Supplier: sdl2
Acquired dlopen error on Basis: dlopen(/System/Library/Frameworks/Basis.framework/Variations/Present/Basis, 0x0001): tried: 
'/Customers/new/Library/Developer/Xcode/DerivedData/myapp-deuixmebehiupbgrnnjqvcwsuajz/Construct/Merchandise/Debug-iphonesimulator/Basis.framework/Variations/Present/Basis' (no such file), 
'/Purposes/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Sources/RuntimeRoot/System/Library/Frameworks/Basis.framework/Variations/Present/Basis' 
(no such file), '/System/Library/Frameworks/Basis.framework/Variations/Present/Basis' (no such file), 
'/Customers/new/Library/Developer/Xcode/DerivedData/myapp-deuixmebehiupbgrnnjqvcwsuajz/Construct/Merchandise/Debug-iphonesimulator/Basis.framework/Variations/C/Basis' (no such file), 
'/Purposes/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Sources/RuntimeRoot/System/Library/Frameworks/Basis.framework/Variations/C/Basis' 
(no such file), '/System/Library/Frameworks/Basis.framework/Variations/C/Basis' (no such file)
Acquired fallback dlopen error on Basis: dlopen(/Teams/System/Library/Frameworks/Basis.framework/Variations/Present/Basis, 0x0001): tried: 
'/Customers/new/Library/Developer/Xcode/DerivedData/myapp-deuixmebehiupbgrnnjqvcwsuajz/Construct/Merchandise/Debug-iphonesimulator/Basis.framework/Variations/Present/Basis' (no such file), 
'/Purposes/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Sources/RuntimeRoot/Teams/System/Library/Frameworks/Basis.framework/Variations/Present/Basis' 
(no such file), '/Teams/System/Library/Frameworks/Basis.framework/Variations/Present/Basis' (no such file), '/System/Library/Frameworks/Basis.framework/Variations/Present/Basis' (no 
such file)
[INFO   ] [Camera      ] Supplier: avfoundation
OpenCV bindings requires "numpy" package deal.
Set up it through command:
    pip set up numpy
 Traceback (most up-to-date name final):
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/core/__init__.py", 
line 24, in <module>
     from . import multiarray
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/core/multiarray.py", 
line 10, in <module>
     from . import overrides
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/core/overrides.py", 
line 8, in <module>
     from numpy.core._multiarray_umath import (
 ImportError: can't import identify '_ArrayFunctionDispatcher' from 'numpy.core._multiarray_umath' (numpy.core._multiarray_umath)
 
 Throughout dealing with of the above exception, one other exception occurred:
 
 Traceback (most up-to-date name final):
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/__init__.py", 
line 130, in <module>
     from numpy.__config__ import present as show_config
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/__config__.py", 
line 4, in <module>
     from numpy.core._multiarray_umath import (
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/core/__init__.py", 
line 50, in <module>
     elevate ImportError(msg)
 ImportError: 
 
 IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
 
 Importing the numpy C-extensions failed. This error can occur for
 many causes, usually resulting from points along with your setup or how NumPy was
 put in.
 
 We now have compiled some widespread causes and troubleshooting suggestions at:
 
     https://numpy.org/devdocs/consumer/troubleshooting-importerror.html
 
 Please word and verify the next:
 
   * The Python model is: Python3.10 from 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/myapp"
   * The NumPy model is: "1.26.3"
 
 and guarantee that they're the variations you count on.
 Please fastidiously examine the documentation linked above for additional assist.
 
 Authentic error was: can't import identify '_ArrayFunctionDispatcher' from 'numpy.core._multiarray_umath' (numpy.core._multiarray_umath)
 
 
 The above exception was the direct explanation for the next exception:
 
 Traceback (most up-to-date name final):
   File "/Customers/new/Desktop/toolchain/myapp-ios/YourApp/most important.py", line 21, in <module>
   File "/Customers/new/Desktop/toolchain/myapp-ios/YourApp/scanner.py", line 15, in <module>
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/cv2/__init__.py", 
line 11, in <module>
     import numpy
   File 
"/Customers/new/Library/Developer/CoreSimulator/Units/52F0DAA0-D1EC-43D8-8E54-C1D3E7811235/information/Containers/Bundle/Utility/0845245F-9CE7-42A0-A2C3-F5A1B9508524/myapp.app/lib/python3.10/site-packages/numpy/__init__.py", 
line 135, in <module>
     elevate ImportError(msg) from e
 ImportError: Error importing numpy: you shouldn't attempt to import numpy from
         its supply listing; please exit the numpy supply tree, and relaunch
         your python interpreter from there.
2024-01-04 14:45:56.390989+0100 myapp[72202:753867] Utility stop abnormally!
2024-01-04 14:45:56.462969+0100 myapp[72202:753867] Leaving

Python model : 3.12.1

Numpy model : 1.26.3

OS : MacOS Monterey 12.7.2

I take advantage of toolchain for set up and construct libraries

i adopted this process : https://kivy.org/doc/secure/information/packaging-ios.html

Leave a Reply

Your email address will not be published. Required fields are marked *