question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import numpy error

See original GitHub issue
ipython
Python 3.8.0 (default, Dec  5 2019, 10:23:28)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.12.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import numpy
WARNING: linker: /data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38.so: unused DT entry: type 0x6ffffef5 arg 0x18d0
WARNING: linker: /data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/_multiarray_tests.cpython-38.so: unused DT entry: type 0x6ffffef5 arg 0xd38
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d4cdadb62aa7> in <module>
----> 1 import numpy

/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/__init__.py in <module>
    140     from . import _distributor_init
    141
--> 142     from . import core
    143     from .core import *
    144     from . import compat

/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/__init__.py in <module>
    102 # do this after everything else, to minimize the chance of this misleadingly
    103 # appearing in an import-time traceback
--> 104 from . import _add_newdocs
    105 # add these for module-freeze analysis (like PyInstaller)
    106 from . import _dtype_ctypes

/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/_add_newdocs.py in <module>
   4439
   4440
-> 4441 add_newdoc('numpy.core._multiarray_tests', 'format_float_OSprintf_g',
   4442     """
   4443     format_float_OSprintf_g(val, precision)

/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/function_base.py in add_newdoc(place, obj, doc, warn_on_python)
    504     If possible it should be avoided.
    505     """
--> 506     new = getattr(__import__(place, globals(), {}, [obj]), obj)
    507     if isinstance(doc, str):
    508         _add_docstring(new, doc.strip(), warn_on_python)

ImportError: dlopen failed: cannot locate symbol "tanh" referenced by "/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/_multiarray_tests.cpython-38.so"...

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sbrobergcommented, May 29, 2020

@rgommers

Thanks for the prompt reply. I can have a very reproducible case for you within a week

If you open a new issue, please try and make it reproducible. Also, cross-compiling is generally problematic, distutils doesn’t really support it. I also have no idea what crossenv is. My recommendation would to avoid cross-compiling if at all possible. There are ARM64 wheels in the making, and conda-forge has ARM64 already.

Believe me, nothing would please me more than to not have to do build this stuff myself. FYI, crossenv is a python module that facilitates cross-compiling other python modules.

You’ll have to forgive me, because python is not my domain, and I’ve been tasked with being able to run our test suite (written in python) on this qualcomm arm64 android board. From your suggestion above, I looked briefly at the conda-forge intro page and it presumes I have conda installed. Does this mean I have to cross compile conda? The system I’m on has no apt, or even a c compiler.

I’ve made some progress switching to using Termux and starting an ssh server so I can connect to our Android board (this has apt and allowed me to install numpy successfly via pip), but I’m stuck on getting opencv (with python bindings) to build. I realize this isn’t your job, but I’d appreciate it if you can point me at a resource that sets me in the right direction, as there seem to be a million different ways of supposedly skinning this cat.

0reactions
rgommerscommented, May 30, 2020

Ah, missed that. Then contributing on the conda-forge feedstock would be my recommendation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting ImportError — NumPy v1.25.dev0 Manual
In certain cases a failed installation or setup issue can cause you to see the following error message: IMPORTANT: PLEASE READ THIS FOR...
Read more >
Error "Import Error: No module named numpy" on Windows
It turns out the problem happens when you're installing Numpy to a version of python and trying to run the program using another...
Read more >
[Solved] No Module Named Numpy in Python
No Module Named Numpy is one of the persistent errors if you have multiple pythons installed or a virtual environment set up. This...
Read more >
How to Fix: No module named NumPy - GeeksforGeeks
Numpy is a module used for array processing. The error “No module named numpy ” will occur when there is no NumPy library...
Read more >
No Module Named Numpy Import Error : Fix this Issue Easily
If you are getting this Import Error on Linux then you have to first check the system path of the installed python. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found