为什么在 Termux 中安装 numpy 时 pip 会抛出错误?

Vad*_*Sim 7 terminal android python pip installation

我正在 Termux 中安装 numpy。当我运行时pip install numpy --no-cache-dir,错误是:

File "/data/data/com.termux/files/usr/tmp/pip-install-ywfqxfk8/numpy_cf9d5c136bf14c7f9ce4181f190e4581/numpy/core/setup.py", line 171, in check_math_capabilities
          raise SystemError("One of the required function to build numpy is not"
      SystemError: One of the required function to build numpy is not available (the list is ['sin', 'cos', 'tan', 'sinh', 'cosh', 'tanh', 'fabs', 'floor', 'ceil', 'sqrt', 'log10', 'log', 'exp', 'asin', 'acos', 'atan', 'fmod', 'modf', 'frexp', 'ldexp']).
Run Code Online (Sandbox Code Playgroud)

有完整的输出: https: //pastebin.com/ExnbqtDc。为什么会发生这种情况以及如何解决?


软件包wheel和setuptools已安装。

小智 14

使用:

MATHLIB="m" pip3 install numpy
Run Code Online (Sandbox Code Playgroud)