esem-bridge is zero-configuration by default — it findsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Crane04/esem/llms.txt
Use this file to discover all available pages before exploring further.
python3 on your system PATH and uses it automatically. For projects that require a specific interpreter, a virtualenv, or a conda environment, a single environment variable lets you point the bridge at exactly the Python binary you need.
Supported environment variables
| Variable | Default | Description |
|---|---|---|
ESEM_PYTHON | python3 | Path or name of the Python interpreter used to spawn the worker process |
Usage scenarios
Each scenario below shows how to setESEM_PYTHON to match your project’s Python setup. Only the relevant scenario applies — no other configuration is required alongside it.
Default — system Python 3
WhenESEM_PYTHON is not set, esem-bridge spawns python3 from your system PATH. No configuration is needed.
Virtualenv
PointESEM_PYTHON at the interpreter inside your virtual environment so the worker has access to all packages installed there.
Conda environment
Use the full path to the conda environment’s interpreter.Specific Python version
If multiple Python versions are installed and available onPATH, use a version-qualified binary name.
With the esem CLI
ESEM_PYTHON works the same way when running through the esem CLI, which enables the python: import syntax.
Setting ESEM_PYTHON persistently
Prefixing every command with the variable quickly becomes tedious. Two common approaches keep it consistent without repetition.Shell profile
Export the variable in your shell’s profile file (e.g.~/.bashrc, ~/.zshrc, or ~/.profile) so it is available in every terminal session.
source ~/.zshrc for the change to take effect.
.env file
For project-level configuration, store the variable in a.env file at the project root and load it with a dotenv-compatible library before your script runs.
Where the variable is read
ESEM_PYTHON is read once, at the moment the Python worker is first spawned. This happens inside ensureWorker(), which is called automatically on the first python() invocation. The relevant line in bridge.js is:
Because
ESEM_PYTHON is read when ensureWorker() is called — that is, on
the first python() call — you can set the variable at any point before that
call, including programmatically via process.env.ESEM_PYTHON = "..." early
in your script. Changes made after the worker has already started have no
effect on the running worker.