Skip to content

Importing the multiarray numpy extension module failed.  #1778

Description

@z-huabao

Versions

  • Python: 3.5.2 and 3.6.7
  • OS: Ubuntu16 and Ubuntu18
  • Kivy: 1.10.1
  • Cython: 0.28 and 0.29

Description

I use numpy in my code, and use buldozer to build app, building is ok, but app broke when run my app in Android.
And this error disappear if not import numy.
I have try numpy 1.15, 1.16, they are same, but 1.14 build fail!

It seems like Issue 1678, but I have not use opencv.

buildozer.spec

Command:

buildozer android debug

Spec file:

[app]

# (str) Title of your application
title = OilDetector

# (str) Package name
package.name = OilDetector

# (str) Package domain (needed for android/ios packaging)
package.domain = org.test.OilDetector

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas

version = 0.1

requirements = python3,kivy,numpy

orientation = landscape

osx.python_version = 2

# Kivy version to use
osx.kivy_version = 1.9.1

fullscreen = 1
android.api = 28

android.ndk = 17c

android.arch = arm64-v8a

ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master

ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0


[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1

Logs

04-02 17:40:18.841  3185  3221 I python  :  Traceback (most recent call last):
04-02 17:40:18.841  3185  3221 I python  :    File "/home/zhb/my_projects/StateGrid-project/kivy/.buildozer/android/platform/build/build/python-installs/OilDetector/numpy/core/__init__.py", line 16, in <module>
04-02 17:40:18.841  3185  3221 I python  :  ImportError: dlopen failed: cannot locate symbol "__fixunstfsi" referenced by "/data/data/org.test.oildetector.oildetector/files/app/_python_bundle/site-packages/numpy/core/multiarray.so"...
04-02 17:40:18.842  3185  3221 I python  :
04-02 17:40:18.842  3185  3221 I python  :  During handling of the above exception, another exception occurred:
04-02 17:40:18.842  3185  3221 I python  :
04-02 17:40:18.842  3185  3221 I python  :  Traceback (most recent call last):
04-02 17:40:18.842  3185  3221 I python  :    File "/home/zhb/.buildozer/.buildozer/android/app/main.py", line 8, in <module>
04-02 17:40:18.843  3185  3221 I python  :    File "/home/zhb/.buildozer/.buildozer/android/app/shoot_screen.py", line 5, in <module>
04-02 17:40:18.843  3185  3221 I python  :    File "/home/zhb/my_projects/StateGrid-project/kivy/.buildozer/android/platform/build/build/python-installs/OilDetector/numpy/__init__.py", line 142, in <module>
04-02 17:40:18.843  3185  3221 I python  :    File "/home/zhb/my_projects/StateGrid-project/kivy/.buildozer/android/platform/build/build/python-installs/OilDetector/numpy/add_newdocs.py", line 13, in <module>
04-02 17:40:18.844  3185  3221 I python  :    File "/home/zhb/my_projects/StateGrid-project/kivy/.buildozer/android/platform/build/build/python-installs/OilDetector/numpy/lib/__init__.py", line 8, in <module>
04-02 17:40:18.844  3185  3221 I python  :    File "/home/zhb/my_projects/StateGrid-project/kivy/.buildozer/android/platform/build/build/python-installs/OilDetector/numpy/lib/type_check.py", line 11, in <module>
04-02 17:40:18.845  3185  3221 I python  :    File "/home/zhb/my_projects/StateGrid-project/kivy/.buildozer/android/platform/build/build/python-installs/OilDetector/numpy/core/__init__.py", line 26, in <module>
04-02 17:40:18.845  3185  3221 I python  :  ImportError:
04-02 17:40:18.845  3185  3221 I python  :  Importing the multiarray numpy extension module failed.  Most
04-02 17:40:18.846  3185  3221 I python  :  likely you are trying to import a failed build of numpy.
04-02 17:40:18.846  3185  3221 I python  :  If you're working with a numpy git repo, try `git clean -xdf` (removes all
04-02 17:40:18.846  3185  3221 I python  :  files not under version control).  Otherwise reinstall numpy.
04-02 17:40:18.846  3185  3221 I python  :
04-02 17:40:18.846  3185  3221 I python  :  Original error was: dlopen failed: cannot locate symbol "__fixunstfsi" referenced by "/data/data/org.test.oildetector.oildetector/files/app/_python_bundle/site-packages/numpy/core/multiarray.so"...
04-02 17:40:18.846  3185  3221 I python  :
04-02 17:40:18.846  3185  3221 I python  : Python for android ended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions