错误:无法在 Termux 上安装 Pandas 库 (2023)

Error: Can't install Pandas library on Termux (2023)

提问人:Nel Carlo Bayang 提问时间:10/4/2023 最后编辑:Nel Carlo Bayang 更新时间:10/5/2023 访问量:203

问:

我尝试使用 pandas 安装,但由于某种原因,pip 看不到 numpy 在哪里。pip install pandas

我已经通过做 numpypkg install python-numpy

我有证据:

~ $ python
Python 3.11.5 (main, Aug 30 2023, 00:13:08) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> a = numpy.random.randint(10, size=(4,4))
>>> a
array([[1, 6, 2, 6],
       [5, 1, 5, 9],
       [1, 8, 5, 3],
       [2, 8, 9, 3]])
>>>

当我尝试使用它安装 pandas 时,显示以下错误日志(我只包含最后的日志):pip install pandas

        INFO: Platform      :


          Architecture: aarch64


          Compiler    : clang





        CPU baseline  :


          Requested   : 'min'


          Enabled     : NEON NEON_FP16 NEON_VFPV4 ASIMD


          Flags       : none


          Extra checks: none





        CPU dispatch  :


          Requested   : 'max -xop -fma4'


          Enabled     : ASIMDHP ASIMDDP ASIMDFHM


          Generated   : none


        INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /data/data/com.termux/files/usr/tmp/pip-install-t7vd_qoe/numpy_9a310625fce34ac29b815ac5ab43bd77/build/temp.linux-aarch64-3.11/ccompiler_opt_cache_clib.py


        [end of output]





    note: This error originates from a subprocess, and is likely not a problem with pip.


    ERROR: Failed building wheel for numpy


  Failed to build numpy


  ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects


  [end of output]

注意:此错误源自子进程,可能不是 pip 的问题。

错误:Subprocess-exited-with-error

×用于安装生成依赖项的 pip 子进程未成功运行。

│ 退出码:1

╰─> 输出见上文。

注意:此错误源自子进程,可能不是 pip 的问题。

先谢谢你。

Python Pandas 安装 pip termux

评论


答:

0赞 fidibsp 10/4/2023 #1

尝试通过以下方式卸载您的 nppip uninstall numpy

重新启动计算机

然后先安装 pandas,然后安装 numpypip install pandas pip install numpy

评论

0赞 Nel Carlo Bayang 10/5/2023
我尝试在termux(mobile)中使用pip安装numpy,但失败了。这就是我使用 python-numpy 的原因
2赞 Nel Carlo Bayang 10/5/2023 #2

最后,我没有设法通过pip安装熊猫,但是我使用了其他方法。 这是为未来的“提问者”准备的(这在 3000 年可能不起作用)。

首先,确保安装必要的存储库并通过 安装 numpy 。pkg install python-numpy

然后安装 tur-repo:

pkg install tur-repo

我不知道依赖项,但如果你想知道,请转到它的 github 存储库。

然后,在你做完 tur-repo 之后,

pkg install python-pandas

就是这样!我简直不敢相信我找到了答案。