numba fails to be imported in Termux, aarch64, android 9

See original GitHub issue

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"
$ 

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tigran123commented, Jul 29, 2019

Oh, sorry, I should have included that info — my fault! The architecture is aarch64, the hardware is Samsung Galaxy Tab S4, running Android 9:

$ termux-info
Updatable packages:
All packages up to date
Subscribed repositories:
https://dl.bintray.com/grimler/science-packages-24 science/stable
https://its-pointless.github.io/files/24 termux/extras
https://its-pointless.github.io/files/24 termux/extras
https://dl.bintray.com/grimler/game-packages-24 games/stable
https://dl.bintray.com/termux/termux-packages-24 stable/main
System information:
Linux localhost 4.4.153-16123450 #2 SMP PREEMPT Wed Jun 12 13:21:47 KST 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
9
Device manufacturer:
samsung
Device model:
SM-T830

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”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A brand new website interface for an even better experience!
numba fails to be imported in Termux, aarch64, android 9.
Read more >
Supported Python features - Numba
Numba does not handle function objects as real objects. Once a function is assigned to a variable, the variable cannot be re-assigned to...
Read more >
Newest 'termux' Questions - Stack Overflow
I am a Hobby programmer here now trying to get into assembler for an android phone. I cannot open a disk file. I...
Read more >
FAQ - Termux Wiki
It is strongly suggested to start from these pages because FAQ does not ... Fortunately, we chose to force use compatibility with Android...
Read more >
Termux (github version) 0.118.0 (Android 7.0+) - APKMirror
Termux (github version) 0.118.0 (Android 7.0+) APK Download by Fredrik Fornwall - APKMirror Free and ... Target: Android 9.0 (Pie, API 28).
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