Skip to content

Python ​

Catalog v8.

Installs the Python interpreter, virtualenv, and the Pyright language server for project environments inside the VM. Binary wheels from PyPI load as on other Linux systems. The interpreter's separate HTML documentation is not installed automatically. Runtime help() and standard-library help remain available.

Select ​

toml
[toolchains]
python = "3.15"

Choose the line in the [toolchains] table of limanix.toml and apply the change. The client guide describes the [toolchains] table.

Versions ​

The value selects one line:

ValuePythonvirtualenvNotes
3.153.15.xBaseRecommended
3.143.14.xBase
3.133.13.xBase
3.123.12.xBase

Lines marked .x and their virtualenv come from the base Nixpkgs revision and receive its updates with each catalog release. The virtualenv command creates environments with the selected Python line.

Upstream support stages and EOL dates are listed in Status of Python versions.

Each line also adds a command with its version, such as python-3.15.

Use ​

Inside the VM, create a virtual environment in the project directory, activate it, and install the project's dependencies:

console
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

The environment includes pip. virtualenv .venv creates an equivalent environment with the virtualenv tool. Run deactivate to leave the environment.

Binary wheels and native code ​

Wheels with native code, such as NumPy or pandas, expect the C++ runtime and zlib that other Linux systems provide. python loads both when it starts. The C++ runtime comes from the newest GCC in Nixpkgs, so it also serves extensions built with any GCC line. Environments created with python -m venv or virtualenv run the same interpreter. Programs that Python starts do not inherit these libraries.

A package that compiles C code while it installs needs a compiler and the headers of the library it uses: select GCC and add the library to [nixos] packages.

Language server ​

The module installs Pyright from the catalog's base Nixpkgs revision. The language server package follows that revision independently of the selected Python interpreter line. It declares the pyright tool with pyright-langserver --stdio under lmx.capabilities.languageSupport. Selecting AstroNvim alongside Python enables the declared server; installing Python alone does not enable an editor. Pyright reads project settings from pyrightconfig.json or [tool.pyright] in pyproject.toml; see its configuration reference.

An ordinary user definition may replace the complete tool declaration, including its package, command, and arguments. The final declared package is also installed in the system profile.

Configuration and integration
BoundaryContract
Public capabilitylmx.capabilities.languageSupport.tools.pyright; Python parser
Personal stateProject virtual environments, pip cache and Pyright project configuration
Runtime librariespython3.X is a copy of the interpreter that loads libstdc++.so.6 and libz.so.1 at startup; python and python3 point to it
IntegrationDeclares Pyright independently of interpreter lines without enabling an editor
ServicesNo daemon

Corner cases ​

CaseBehavior or next step
Wrong interpreter in a venvA venv retains the interpreter that created it; recreate it when changing interpreter lines
A wheel needs another system library, such as libGL.so.1Add the library to [nixos] packages and run Python with LD_LIBRARY_PATH=/run/current-system/sw/lib
HTML manuals are absentRuntime help() remains available; select an HTML documentation package separately if needed
Pyright cannot find project dependenciesConfigure the project environment in pyrightconfig.json or pyproject.toml

Free and open source under the Apache License 2.0.