devmaxxing / videocr-PaddleOCR

Extract hardcoded subtitles from videos using machine learning
MIT License
124 stars 16 forks source link

Error when building PyMuPDF #18

Closed glu8716 closed 1 month ago

glu8716 commented 1 month ago

I'm trying to install the project on a python virtual environment. I keep getting this error:

      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'fitz._fitz' extension
      swigging fitz/fitz.i to fitz/fitz_wrap.c
      swig -python -o fitz/fitz_wrap.c fitz/fitz.i
      error: command 'swig' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyMuPDF
Successfully built videocr                                                                                                                                 
Failed to build PyMuPDF
ERROR: Could not build wheels for PyMuPDF, which is required to install pyproject.toml-based projects
devmaxxing commented 1 month ago

@glu8716 what Python version are you using? Is it between 3.7-3.10? I've seen the PyMuPDF error in newer versions of Python.

glu8716 commented 1 month ago

Oh, you are right. I'm sorry, I missed the part of Python 3.7-3.10. I've tried with 3.9 and it's working fine now, thanks!