numba: numba fails to be imported in Termux, aarch64, android 9
I installed numba in Termux using the usual pip install numba and it succeeded, however trying to import it fails like this:
$ python -c "import numba"
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typeconv/typeconv.py", line 6, in <module>
from . import _typeconv
ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typeconv/_typeconv.cpython-37m.so"...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/__init__.py", line 18, in <module>
from .special import typeof, prange, pndindex, gdb, gdb_breakpoint, gdb_init
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/special.py", line 3, in <module>
from .typing.typeof import typeof
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typing/__init__.py", line 2, in <module>
from .context import BaseContext, Context
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typing/context.py", line 12, in <module>
from numba.typeconv import Conversion, rules
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typeconv/rules.py", line 3, in <module>
from .typeconv import TypeManager, TypeCastingRules
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typeconv/typeconv.py", line 16, in <module>
raise ImportError(msg)
ImportError: Numba could not be imported.
If you are seeing this message and are undertaking Numba development work, you may need to re-run:
python setup.py build_ext --inplace
(Also, please check the development set up guide http://numba.pydata.org/numba-doc/latest/developer/contributing.html.)
If you are not working on Numba development:
Please report the error message and traceback, along with a minimal reproducer
at: https://github.com/numba/numba/issues/new
If more help is needed please feel free to speak to the Numba core developers
directly at: https://gitter.im/numba/numba
Thanks in advance for your help in improving Numba!
The original error was: 'dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numba/typeconv/_typeconv.cpython-37m.so"...'
Note that llvmlite is installed and imports just fine:
$ pip list | grep llvm
llvmlite 0.29.0
$ python -c "import llvmlite"
$
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 1
- Comments: 21 (7 by maintainers)
Oh, sorry, I should have included that info — my fault! The architecture is aarch64, the hardware is Samsung Galaxy Tab S4, running Android 9:
Python is version 3.7.4 — it is part of every decent Linux system distribution, including Termux, so I didn’t have to do anything special, other than “apt install python”. And all the packages I installed via “pip install pkgname”.