I am trying to run a program using the PyMuPDF library, which must be imported under the name 'fitz'.
I am running VSCode in MacOS 13.4, with python 3.11.4.
What are the next best steps to troubleshoot?
I have selected the correct conda virtual environment as the interpreter, and also activated the environment in Terminal. In addition, I have ran the command <conda list --name myenv>, which has shown that indeed, PyMuPDF (and pymupdfB) are installed, and fitz is NOT installed.
[Writing this as an answer because posting a comment fails.]
I've seen problems like this after mistakenly installing the
fitz
package and then removing it. Can you try again in a clean Conda environment?Also, can you list the contents of your Conda environment's
fitz
directory? I'm not familiar with Conda, but a Pythonvenv
will have a directory called.../lib/python3.10/site-packages/fitz/
, so there is probably a similar directory in Conda.