Elide runs Python directly with its embedded Python runtime and bundled standard
library. You do not need a separate CPython install to run .py files,
standard-library scripts, or Python CLIs with Elide.
Running Python
Elide picks Python automatically from the file extension:
elide hello.py
elide run hello.py
Elide also provides a CPython-style python subcommand for users who expect
Python’s command-line shape:
elide python hello.py
elide python -c 'print("Hello from Python")'
elide python -m json.tool input.json
When you run a script, trailing tokens become sys.argv values just as they do
with CPython:
elide python cli.py --name Elide --count 2
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--name", default="Python")
parser.add_argument("--count", type=int, default=1)
args = parser.parse_args()
for _ in range(args.count):
print(f"Hello, {args.name}!")
Python Runtime
| Language | Python |
|---|---|
| Runtime | Embedded Python runtime |
| Standard library | Python 3.12 era behavior |
| Reported compatibility | See the external Compatibility matrix |
| CLI entry point | elide python supports CPython-style script, -c, and -m usage |
The exact Python runtime details are resolved from the Elide binary you run. For compatibility status, see the external Compatibility matrix.
Virtual Environments
When VIRTUAL_ENV is set, Elide appends that environment’s
lib/python<version>/site-packages directory to Python’s module search path.
Packages already installed into an activated virtual environment are importable
when you run .py files with Elide.
Installing Python Dependencies
Elide's embedded uv integration is shipped, but still experimental. Use it for PyPI install workflows that you can validate in your project.
Elide embeds uv for PyPI dependency
installation. Declare packages in elide.pkl:
amends "elide:project.pkl"
dependencies {
pypi {
packages {
"six==1.17.0"
"requests>=2"
}
}
}
Then install dependencies:
elide install
Elide also recognizes requirements.txt and pyproject.toml as Python project
markers. Installed packages land in .dev/dependencies/pypi/site-packages,
which Elide adds to the Python module search path when running files from the
project.
You can call the embedded uv CLI directly when you need uv-specific behavior:
elide uv -- pip --help
PyPI install is available on macOS and Linux; Windows support is in progress. See Dependencies for the unified npm, PyPI, and Maven installer.
Additional Resources
- Elide + Python — Python runtime overview, entrypoints, and interop
- Dependencies — unified npm, PyPI, and Maven installer
- Compatibility — latest reported compliance results from
elide-dev/testsuite