[spark] pypi — Python Package Index (PyPI) access is not allowed
Description
[Description] pypi — Python Package Index (PyPI) access is not allowed
[Environment] Device: spark Node.js: v22.22.2 npm: 10.9.7 Docker: 29.1.3, build f52814d OpenShell CLI: 0.0.16 NemoClaw: v0.0.1 (commit 36300135a9d240126c1755effd212dad451fa861 (HEAD, tag: v0.0.1, tag: latest)) FastOS: 1.120.38
[Steps to Reproduce]
1. Onboarding with default policy
[5/7] Creating sandboxApply suggested presets (pypi, npm)? [Y/n/list]: Y────────────────────────────────────────────────── Creating sandbox 'my-sandbox' (this takes a few minutes on first run)... Building image openshell/sandbox-from:1774945171 from /tmp/nemoclaw-build-Jx4bq4/Dockerfile Built image openshell/sandbox-from:1774945171 Pushing image openshell/sandbox-from:1774945171 into gateway "nemoclaw" [progress] Exported 468 MiB [progress] Uploaded to gateway Image openshell/sandbox-from:1774945171 is available in the gateway. Sandbox reported Ready before create stream exited; continuing. Waiting for sandbox to become ready... Waiting for NemoClaw dashboard to become ready... Dashboard taking longer than expected to start. Continuing... ! No active forward found for port 18789 ✓ Forwarding port 18789 to sandbox my-sandbox in the background Access at: http://127.0.0.1:18789/ Stop with: openshell forward stop 18789 my-sandbox Setting up sandbox DNS proxy... Setting up DNS proxy in pod 'my-sandbox' (10.200.0.1:53 -> 10.42.0.5)... [PASS] DNS forwarder running (pid=452): dns-proxy: 10.200.0.1:53 -> 10.42.0.5:53 pid=452 [PASS] resolv.conf -> nameserver 10.200.0.1 [PASS] iptables: UDP 10.200.0.1:53 ACCEPT rule present [PASS] getent hosts github.com -> 140.82.116.4 github.com DNS verification: 4 passed, 0 failed ✓ Sandbox 'my-sandbox' created
[6/7] Setting up OpenClaw inside sandbox ────────────────────────────────────────────────── ✓ OpenClaw gateway launched inside sandbox
[7/7] Policy presets ──────────────────────────────────────────────────
Available policy presets: ○ discord — Discord API, gateway, and CDN access ○ docker — Docker Hub and NVIDIA container registry access ○ huggingface — Hugging Face Hub, LFS, and Inference API access ○ jira — Jira and Atlassian Cloud access ○ npm — npm and Yarn registry access (suggested) ○ outlook — Microsoft Outlook and Graph API access ○ pypi — Python Package Index (PyPI) access (suggested) ○ slack — Slack API, Socket Mode, and webhooks access ○ telegram — Telegram Bot API access
Apply suggested presets (pypi, npm)? [Y/n/list]: Y ✓ Policy version 2 submitted (hash: e6efab26992a) ✓ Policy version 2 loaded (active version: 2) Applied preset: pypi ✓ Policy version 3 submitted (hash: a6236e34409f) ✓ Policy version 3 loaded (active version: 3) Applied preset: npm
────────────────────────────────────────────────── Sandbox my-sandbox (Landlock + seccomp + netns) Model nvidia/nemotron-3-super-120b-a12b (NVIDIA Endpoints) NIM not running ────────────────────────────────────────────────── Run: nemoclaw my-sandbox connect Status: nemoclaw my-sandbox status Logs: nemoclaw my-sandbox logs --follow
OpenClaw UI (tokenized URL; treat it like a password) Port 18789 must be forwarded before opening this URL. http://127.0.0.1:18789/#token=f3a3f244c9d8191943428bce4c5ae3a20a748022fffcd14a4beacaa4a1ac33a3 ──────────────────────────────────────────────────
[INFO] === Installation complete ===
NemoClaw (469s)
Your OpenClaw Sandbox is live. Sandbox in, break things, and tell us what you find.
Next: $ nemoclaw my-sandbox connect sandbox@my-sandbox$ openclaw tui
GitHub https://github.com/nvidia/nemoclaw Docs https://docs.nvidia.com/nemoclaw/latest/
Inside sanbox:
sandbox@my-sandbox:~$ pip install requests
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
sandbox@my-sandbox:~$
[Expected Result] pip installation successfully
[Actual Result]
sandbox@my-sandbox:~$ pip install requests
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Steps to reproduce
No steps provided.
[NVB# 6034913]
[NVB#6034913]
[NVB#6067978]
The error is expected. You would see the same error without the sandbox. It's Python's restriction, not a network policy issue. You can use a virtual environment:
python3 -m venv testEnv
source ./testEnv/bin/activate
pip install requests
Or
pip install requests --break-system-packages (not recommended).