
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']).
전체 출력이 있습니다.https://pastebin.com/ExnbqtDc. 왜 이런 일이 발생하며 어떻게 해결합니까?
패키지 휠과 setuptools가 설치됩니다.
답변1
사용:
MATHLIB="m" pip3 install numpy
답변2
이유는 모르겠지만 이 방법도 작동하며 Termux의 경우 훨씬 더 빠른 것 같습니다.
LDFLAGS="-lm -lcompiler_rt" pip install cython numpy
답변3
xuziyue의 답변에 추가 :
짧은 버전:
Python 설치와 호환되는 Numpy 버전을 설치해야 합니다. 확인하세요.여기.
더 긴 버전:
처음에는 방금 실행했습니다.
MATHLIB="m" pip install numpy
이것은 numpy를 성공적으로 설치했지만 나를 얻었습니다.나중에 가져올 때 오류가 많이 발생함내 코드에 넣으세요.
하지만실행 python --version
후 이에 대해 확인테이블, 다음을 시도합니다.
MATHLIB="m" pip install numpy==1.24
실제로 모든 것이 예상대로 작동했습니다.
참고로 저는 지금 Android에서 이것을 실행하고 있습니다.
- Termux 0.118.0
- 파이썬 3.10.4
- 넘파이 1.24
도움이 되었기를 바랍니다.