import numpy
Traceback (most recent call last):
File "
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/init.py", line 142, in
from . import add_newdocs
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/lib/init.py", line 8, in
from .type_check import *
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in
import numpy.core.numeric as _nx
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/core/__init__.py", line 21, in
from . import umath
ImportError: dlopen failed: cannot locate symbol "__mulodi4" referenced by "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/core/umath.cpython-35m-arm-linux-gnueabi.so"...
I search this , I found I must install gcc but gcc remove apt list(i installed clang but still cannot operate)
How can I fix it?
the __mulodi4 means you haven't linked against compiler_rt
i think you need to specifically add -lm and -lcompiler_rt flags to compiler and it will work
I try
LDFLAGS=" -lm -lcompiler_rt" pip install numpy
But I didn't work.
How can I add -lm -lcompiler_rt flags to compiler while installing numpy?
LDFLAGS=" -lm -lcompiler_rt" pip install numpy
Collecting numpy
Installing collected packages: numpy
Successfully installed numpy-1.11.2
$ python
Python 3.5.2 (default, Sep 26 2016, 20:15:37)
[GCC 4.9.x 20150123 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import numpy
Traceback (most recent call last):
File "", line 1, in
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/init.py", line 142, in
from . import add_newdocs
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/lib/init.py", line 8, in
from .type_check import *
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in
import numpy.core.numeric as _nx
File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/core/__init__.py", line 21, in
from . import umath
ImportError: dlopen failed: cannot locate symbol "__mulodi4" referenced by "/data/data/com.termux/files/usr/lib/python3.5/site-packages/numpy/core/umath.cpython-35m-arm-linux-gnueabi.so"...
Ooooooh~
I fixed it
LDFLAGS="-lm -lcompiler_rt" pip install --no-cache-dir numpy
I think I was stupid.
Thanks your answer add LDFLAGS
I am really really happy . Yeah!
Thanks for the solution. I meet the same situation.
Thanks a lot for solving my problem too!
For the sake of completeness I have scipy working as well in a repo of mine.
Can anyone explain me the purpose of:LDFLAGS="-lm -lcompiler_rt" ?
My termux is *8 times faster them my (i3 4G ram) laptop and I suspect it has something to do with it...
Most helpful comment
Ooooooh~
I fixed it
LDFLAGS="-lm -lcompiler_rt" pip install --no-cache-dir numpy
I think I was stupid.
Thanks your answer add LDFLAGS
I am really really happy . Yeah!