

PyBox is the Python IDE I build. The steps below use it, and the ideas carry over to any Android coding app. Get it on Google Play.
Two kinds of package
- Pure Python:
requests,rich,flask. These are just.pyfiles and install from PyPI. - Compiled:
numpy,scipy,opencv-python. They contain C or C++ code and must be built for Android's CPU, arm64 or x86_64.
Install with requirements.txt
- Open your project and create
requirements.txt. - List one package per line.
- Tap sync.
requests
rich
numpy
pandas
matplotlib
Install in the terminal
pip install requests
pip list
pip show numpy
Common errors
| Error | Cause | Fix |
|---|---|---|
| No matching distribution | No wheel for Android | Use a package PyBox ships a wheel for, or a pure Python alternative |
| Failed building wheel | Needs a native compiler | Avoid building from source on the phone |
| ModuleNotFoundError | Installed in a different interpreter | Install from the same project environment |
| Network error | No connection | Connect once to download, then work offline |
What ships ready
PyBox provides prebuilt wheels for NumPy, SciPy, pandas, Matplotlib, scikit-learn, PyTorch, TensorFlow Lite, ONNX Runtime and OpenCV. See Python libraries on Android for the list.
Questions
How do I install pip packages on Android?
In PyBox, add the package to requirements.txt and sync, or run pip in the terminal. Pure Python packages come from PyPI. Compiled libraries come as prebuilt Android wheels.
Why does pip fail to build NumPy on a phone?
Building native code needs a compiler toolchain a phone lacks. Use a prebuilt wheel built for Android.
Can I install packages offline?
You need a connection to download them once. After that they work offline.