Prerequisites
Before installing the PDF visual regression tester, ensure you have the following:- Python 3.7 or higher: The tool requires Python 3 with pip installed
- pip: Python package installer (usually comes with Python)
- Git: For cloning the repository (optional if downloading as ZIP)
It is strongly recommended to use a virtual environment to avoid conflicts with other Python packages on your system.
Installation steps
Clone the repository
First, clone the repository to your local machine:
Replace
<your-repository-url> with the actual URL of the repository.Create a virtual environment
Create and activate a Python virtual environment to isolate dependencies:After activation, your terminal prompt should show
(venv) indicating the virtual environment is active.Alternative installation with Makefile
If you prefer using Make, you can install dependencies with a single command:python3 -m pip install -r requirements.txt automatically.
Verify installation
To verify that the tool is installed correctly, run the help command:Environment-specific notes
Linux
On some Linux distributions, you may need to install additional system dependencies:macOS
Ensure you have Python 3 installed via Homebrew:Windows
Make sure Python is added to your PATH during installation. You can verify by running:On Windows, you may need to use
python instead of python3 in commands.Troubleshooting
ImportError: No module named 'fitz'
ImportError: No module named 'fitz'
This means PyMuPDF is not installed correctly. Try:
Permission denied errors
Permission denied errors
Make sure you’re using a virtual environment or install with the
--user flag:Python version issues
Python version issues
Verify you’re using Python 3.7 or higher:If your version is older, consider upgrading Python or using pyenv to manage multiple versions.