本系列教程教你如何在 Termux 上安装 Python 包,无需等待编译,直接使用预编译的 wheel 包。
$ pip install numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy
Downloading numpy-2.4.4.tar.gz (20.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error
× installing backend dependencies for numpy did not run successfully.
└─> Installing backend dependencies for ninja... error
└─> Installing cmake... Installing setuptools-scm...
⚠️ 编译失败,折腾半小时还是装不上
结果:编译失败,浪费大量时间 ⏱️
$ pip install --index-url https://nsyhykui.github.io/python_wheels_for_termux/simple/ numpy
Looking in indexes: https://nsyhykui.github.io/.../simple/
Collecting numpy
Downloading numpy-2.4.4-cp313-cp313-android_24_arm64_v8a.whl (5.7 MB)
Installing collected packages: numpy
Successfully installed numpy-2.4.4
real 2m47.352s
结果:不到 3 分钟装好 ✅
pip config set global.index-url https://nsyhykui.github.io/python_wheels_for_termux/simple/
设置后,直接 pip install 包名 即可。
NumPy 是 Python 科学计算的基础包。本教程教你一行命令安装,绕过编译过程。
Pandas 是数据分析的核心工具。使用预编译 wheel,告别漫长的编译等待。
SciPy 包含大量科学计算函数。本教程提供一键安装命令。
Jupyter Notebook/Lab 是交互式开发环境。本教程包含图形界面配置(Termux:X11 / VNC)。
Matplotlib 是 Python 最流行的绘图库。支持 Agg 后端(无图形界面)和 GUI 后端。