The installation process is divided into four key steps:
1. Environmental preparation
Python 3.8+ environment is required, virtual environment is recommended:python -m venv venv
source venv/bin/activate # Linux/Mac
venvScriptsactivate # Windows
2. Dependency installation
Install core dependencies via project requirements.txt:pip install -r requirements.txt
Includes key libraries such as opencv-python, google-cloud-vision, mathpix, etc.
3. API configuration
- Google Vision API: created in config/ directory
google_credentials.jsonIf you have a service account key, fill in the service account key obtained from Cloud Console. - MathPix API: created in config/
mathpix_config.jsonFill in the app_id and app_key of the registered account.
4. Validation testing
(of a computer) runpython test_setup.pyDetect the integrity of the environment, if no error is reported, the installation is successful.
Attention:It is recommended to keep the network open to call the external API, and Windows users need to make sure the Visual C++ runtime library is installed.
This answer comes from the articleVOP: OCR Tool for Extracting Complex Diagrams and Math FormulasThe
































