Installation
Prev: Part 1: Introduction
PyMFCAD is available on PyPI. The recommended installation method uses uv, but legacy venv/pip instructions are also provided.
Why use uv?
uv is a fast, modern Python package manager that simplifies virtual environments and dependency management:
- Installs packages significantly faster than pip
- Automatically manages virtual environments
- Provides a simpler, more reliable workflow for modern Python projects
- Works as a drop-in replacement for pip in most cases
Python versions
Our dependencies currently support Python 3.10–3.13.
Recommended: Install with uv
- (Optional) Create a new project directory:
mkdir my-mf-project && cd my-mf-project - Install uv if you don't have it:
pip install uv - Create a virtual environment and install PyMFCAD:
uv venv uv pip install pymfcad - Quick verification:
uv run python -m examples.full_test
Legacy: Install with venv and pip
- Create and activate a virtual environment:
- macOS/Linux:
python3 -m venv env source env/bin/activate - Windows:
- Command Prompt:
python -m venv env CALL env\Scripts\activate - Windows PowerShell:
python -m venv env .\env\Scripts\Activate.ps1
- Command Prompt:
- macOS/Linux:
- Install PyMFCAD from PyPI:
pip install pymfcad - Quick verification:
python -m examples.full_test
Developing from source
If you are working from the repository, use the Makefile targets below (requires uv).
- Clone or download the repository.
- In a terminal, change into the repository root.
- Use the targets below to install and run the project.
Makefile targets
make init— creates the virtual environment, installs Python packages, and installs JS dependenciesmake build— builds the docs, Vite site, and packages with uvmake serve— updates docs, builds the Vite site, and serves the PyMFCAD webpagemake test— runs all PyTest test casesmake test-coverage— runs all PyTest test cases. Outputs code coverage in htmlcovmake run <python file>— runs a Python filemake mem-profile <python file>— runs a Python file with heaptrackmake py-profile <python file>— runs a Python file with cProfilemake web-install— installs JS dependenciesmake web-build— builds the Vite sitemake clean— removes all build products
Troubleshooting
Issue: pip install uv succeeds, but the uv command is not found.
Fix: Run pip show uv and add the reported install location to your PATH.
Issue: pip install pymfcad fails while building the manifold3d wheel.
Fix: Verify your Python version is supported (Python 3.10–3.13).