Skip to content
Advertisement

How do I resolve “No module named ‘frontend'” error message?

I have installed PymuPDF/fitz because am trying to extract images from PDF files. However, upon running the code below, I am seeing No module named 'frontend'.

JavaScript

I have searched but there isn’t single report of this kind of error. I have installed PyMuPDF, muPDF and fitz modules

Here is the error in full:

JavaScript

Advertisement

Answer

I’ve solved it by:

JavaScript

This will actually allow the import of the fitz you appear to want. (There’s another fitz, which is probably not what you want if you’re manipulating PDF files.)

NOTE: If you get RuntimeError: Directory 'static/' does not exist after install than do:

JavaScript

for more info see: raise RuntimeError(f”Directory ‘{directory}’ does not exist”) RuntimeError: Directory ‘static/’ does not exist from import fitz

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement