Python in DevBox runs on the device. What you can install is decided entirely by the platform it was built for, so that is where this starts.
Platform
| Item | Value |
|---|---|
| Interpreter | Python 3.12 |
| Architecture | i386 (32-bit x86) |
| C library | musl (ld-musl-i386.so.1) |
| Base system | Alpine Linux 3.23 |
| Compiler | None. No gcc, make, or dev headers |
| Package manager | pip, wheels only |
| Binaries | python, python3, pip, pip3 |
| Project path | /root/<projectname> |
No compiler means pip cannot fall back to building from source. A package installs if a matching wheel exists, and does not if one does not.
Wheel tags
Open any package on PyPI, click Download files, and read the filenames.
| Tag in filename | Installs | Why |
|---|---|---|
py3-none-any | Yes | Pure Python, fits every platform |
musllinux_1_2_i686 | Yes | Right libc, right architecture |
manylinux*_x86_64 | No | glibc, and 64-bit |
manylinux*_i686 | No | Right architecture, wrong libc |
macosx_* / win_amd64 | No | Wrong operating system |
Source only (.tar.gz) | No | Nothing to build it with |
Two conditions have to hold at once for a C package: musl rather than glibc, and 32-bit rather than 64. Most publishers ship manylinux and x86_64, which is why numpy and pandas do not install. The hardware is not the reason.
Common packages
| Package | Verdict |
|---|---|
requests, httpx, urllib3 | Installs |
flask, jinja2, werkzeug, click | Installs |
beautifulsoup4, pyyaml, rich, python-dotenv | Installs |
numpy, pandas, scipy | Check the tags first, usually no |
pillow, lxml, cryptography | Check the tags first |
Compiled modules already present
These shipped with the interpreter, so they need no wheel:
_ssl, _hashlib, _sqlite3, _ctypes, _decimal, _lzma, _bz2, zlib, _socket, _asyncio, _multiprocessing, _csv, _json, readline, unicodedata.
HTTPS, SQLite, compression and async all work out of the box. _ctypes is the quiet one: several pure Python libraries bind to system libraries through it instead of shipping C, so they install where you might expect them not to.
Vendoring, which the template does
Create a Python project, choose Template, press run. A Flask app serves on port 8080 with no pip and no network.
Line two of app.py:
import sys; sys.path.insert(0, "./site-packages")
The dependencies sit inside the project rather than the system.
| Template contains | Detail |
|---|---|
| Vendored packages | Flask 3.1.3, Werkzeug, Jinja2, Click, MarkupSafe, itsdangerous, blinker, dotenv |
| Routes | dashboard, analytics, customers, orders, messages, reports |
| HTML templates | 14 |
| Bind address | 0.0.0.0:8080, not loopback |
| Structure | Blueprint, config module, registered error handlers |
Copy the pattern into your own projects:
pip install --target site-packages requests
Add the same sys.path.insert line. The project now carries its libraries, survives a runtime reset, and runs on another device unchanged.
The bind address is deliberate. Loopback restricts the server to the device; 0.0.0.0 lets your laptop reach it once external network access is on in Settings.
devbox.json
Press run on a .py file and DevBox executes python main.py, output going to the log panel. For a server you want the project to know it hosts one.
{
"main": "python app.py",
"browserURL": "http://127.0.0.1:8080"
}
| Key | Effect |
|---|---|
main | Command the run button executes |
browserURL | Where the built-in preview opens |
httpRoot | Document root for the built-in server |
splitViewType | iPad only, what sits beside the editor |
The file is read when the project loads, so close and reopen the project after editing it.
Reset Runtime Environment
| Cleared | Kept |
|---|---|
| Python, Node, PHP runtimes | Projects in root |
| Installed libraries | Files in home |
| Runtime caches | MariaDB data |
A broken pip state costs a minute. A project with a vendored site-packages folder comes through untouched.
Offline reference
The Docs tab stores 49 pages of Python documentation on the device, next to 112 for PHP and 60 for Node.
Backgrounding
iOS suspends apps that leave the screen, and a running server stops answering with them. The screen saver setting keeps the display awake so the app keeps running. Worth enabling before a long install.