Installing with pip, the command is now reported as not found
$ pip3 install sandlock --break-system-packages
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting sandlock
Downloading https://mirrors.aliyun.com/pypi/packages/ea/43/edb389fa0714be7135d8f93ced4f31d762c1c9d8912d57651cf648d5c0a3/sandlock-0.6.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 21.5 MB/s eta 0:00:00
Installing collected packages: sandlock
Successfully installed sandlock-0.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
$ sandlock
bash: sandlock: command not found
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.4
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
I wanted to add sandboxing capabilities to my project running in a container environment, but I found that bubblewrap cannot be used directly because it requires adding --cap-add SYS_ADMIN. The risks involved are too great to outweigh the benefits.
Thanks for the report. The sandlock PyPI package ships the Python SDK plus the sandlock-mcp script. It does not include the sandlock CLI binary. That's why pip install sandlock followed by sandlock gives "command not found." Only sandlock-mcp lands on PATH from pip.
The sandlock CLI is a Rust binary distributed through crates.io:
cargo install sandlock-cli
That installs the sandlock binary into ~/.cargo/bin/.
On the bubblewrap / --cap-add SYS_ADMIN concern: sandlock doesn't use bubblewrap. It uses Landlock + seccomp, neither of which needs SYS_ADMIN or any added capability. As long as your container's kernel is recent enough (Linux 6.12+ for full Landlock ABI v6), sandlock run ... should work inside an unprivileged container.
Thanks for the report. The
sandlockPyPI package ships the Python SDK plus thesandlock-mcpscript. It does not include thesandlockCLI binary. That's whypip install sandlockfollowed bysandlockgives "command not found." Onlysandlock-mcplands on PATH from pip.The
sandlockCLI is a Rust binary distributed through crates.io:cargo install sandlock-cli That installs the
sandlockbinary into~/.cargo/bin/.On the bubblewrap /
--cap-add SYS_ADMINconcern: sandlock doesn't use bubblewrap. It uses Landlock + seccomp, neither of which needsSYS_ADMINor any added capability. As long as your container's kernel is recent enough (Linux 6.12+ for full Landlock ABI v6),sandlock run ...should work inside an unprivileged container.
I don't want to incorporate a full Rust toolchain into my project. What I need is a tool that works out of the box. I found this project after seeing your reply in a Bubblewrap issue. I thought binary installation would only require Python.
Could you please provide binary installation support and ARM64 architecture support?
Could you please provide binary installation support and ARM64 architecture support?
Quick clarification on the first part, then good news on the second.
Prebuilt x86_64 binaries already exist. Every tagged release attaches sandlock-x86_64-unknown-linux-gnu.tar.gz — see https://github.com/multikernel/sandlock/releases/latest. Just tar -xzf and run, no Rust toolchain needed. Sorry it wasn't more discoverable from the README.
aarch64 is landing in the next release. #30 (merged) adds aarch64-unknown-linux-gnu to the release pipeline, plus manylinux_aarch64 wheels. Once the next tag cuts, you'll get both:
sandlock-aarch64-unknown-linux-gnu.tar.gzon GitHub Releasespip install sandlockworking on aarch64 hosts (currently x86_64-only on PyPI)
For the record on what each install path delivers — these are deliberately separate:
| Path | What you get |
|---|---|
pip install sandlock |
Python SDK + sandlock-mcp MCP server |
| GitHub Releases tarball | sandlock CLI binary + libsandlock_ffi.so |
cargo install sandlock-cli |
sandlock CLI binary, built from source |
The Python wheel intentionally doesn't ship the sandlock CLI — the SDK and the CLI have different audiences. If you only need the CLI in your container, the Releases tarball is what you want; no Python required.