Installation¶
Requirements¶
- Python 3.10 or higher (3.12+ recommended)
- pip (comes with Python)
Quick Install (Recommended)¶
Option A: pipx (Best for CLI tools)¶
pipx installs MOL in an isolated environment and makes the mol command available globally. This is the recommended method — it avoids permission errors and doesn't conflict with system Python.
Option B: pip in a Virtual Environment¶
If you prefer pip, create a virtual environment first:
Getting externally-managed-environment error?
Modern Python (3.12+ on Ubuntu/Debian/Fedora) blocks pip install system-wide (PEP 668). Use pipx install mol-lang instead — it handles isolation automatically.
Option C: System-wide pip (Not Recommended)¶
If you understand the risks and want to install globally anyway:
Verify Installation¶
If mol isn't found after installation:
Install from Source¶
# Clone the repository
git clone https://github.com/crux-ecosystem/mol-lang.git
cd mol-lang
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows
# Install MOL
pip install -e .
VS Code Extension¶
MOL ships with a VS Code extension for syntax highlighting and snippets:
- Open VS Code
- Go to Extensions →
...→ Install from VSIX - Or symlink the extension folder:
Restart VS Code. All .mol files will have syntax highlighting automatically.
Dependencies¶
MOL has only one runtime dependency:
| Package | Version | Purpose |
|---|---|---|
| Lark | ≥ 1.1.0 | LALR parser for MOL grammar |
Development dependencies:
| Package | Version | Purpose |
|---|---|---|
| pytest | ≥ 7.0 | Test runner |
| mkdocs-material | latest | Documentation site |