How to Install PyMuPDF in Python
A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
pip install PyMuPDF
What is PyMuPDF?
A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
Community Join us on Discord here: #pymupdf
PyMuPDF requires Python 3.10 or later, install using pip with:
Quick Start
Minimal example to get started with PyMuPDF:
import fitz
print(fitz.__version__)
Installation
pip (standard)
pip install PyMuPDF
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install PyMuPDF
pip3
pip3 install PyMuPDF
conda
conda install -c conda-forge PyMuPDF
Poetry
poetry add PyMuPDF
Verify the Installation
After installing, confirm the package is available:
python -c "import fitz; print(fitz.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing PyMuPDF with pip.
ModuleNotFoundError: No module named 'fitz'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install PyMuPDF. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'fitz' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install PyMuPDF to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'fitz'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show PyMuPDF and upgrade with pip install --upgrade PyMuPDF.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install PyMuPDF. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user PyMuPDF
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org PyMuPDF
Recent Releases
| Version | Released |
|---|---|
1.27.2.2 latest |
2026-03-19 |
1.27.2 |
2026-03-10 |
1.27.1 |
2026-02-11 |
1.26.7 |
2025-12-11 |
1.26.6 |
2025-11-05 |
Manage PyMuPDF
Upgrade to latest version
pip install --upgrade PyMuPDF
Install a specific version
pip install PyMuPDF==1.27.2.2
Uninstall
pip uninstall PyMuPDF
Check what is installed
pip show PyMuPDF