I have a Python project running on my Raspberry Pi 4 to display pdf files. I was using fitz and pymupdf to display them.
It was working fine, until February 2024. Since then I always got the error "no module named frontend", when I tried to import fitz.
Because of this, I uninstalled fitz and installed PyMuPDF again, because of this question:
https://stackoverflow.com/questions/56467667/how-do-i-resolve-no-module-named-frontend-error-message
But when I want to install PyMuPDF. It always crashes when preparing metadata.
(Preparing metadata (pyproject.toml) ... )
With the error: error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
I also tried some older versions of PyMuPDF. (1.23, 1.16.14,...). With older versions I get the error:
Failed building wheel for PyMuPDF.
Since I was not able to fix this problem, I also tried tkPDFViewer.
But this package seems also be based on fitz. - I get the same errors here. (all starting with no module named "frontend")
Also tried pip install frontend. - but then the next errors occur: "This error occured while importing neccesary modules or library Directory 'static/' does not exist".
I really don't know what I should try next. Why does fitz / PyMuPDF suddenly not work any more?
My code with fitz and PyMuPDF was running for almost a year now, without any problems.
I am using a 8GB Raspberry Pi 4 with Raspbian GNU/Linux 11 (bullseye). Python Version: 3.9.2
Please let me know if somebody have the same problems lately with PyMuPdf and fitz.
Older versions of PyMuPDF, TkPdfViewer, reinstall fitz, reinstall Python completely.