You man find “fitz.h”: No such file or directory when installing python pymupdf.
In this tutorial, we will introduce you how to fix it.
Preliminary
We can use command below to install pymupdf
pip install pymupdf
As to us, our python is python 3.6. PyMuPDF 1.19.6 will be installed.
However, we will get error above.
How to fix error?
The simplest way is to install older pymupdf.
As to use we will install 1.18.0 version, because our python is 3.6
For example:
pip install -i https://mirrors.aliyun.com/pypi/simple/ pymupdf==1.18.0
Then this error is fixed.
We will find this error is fixed.
Comparing the difference between installing pymupdf 1.19.6 and 1.18.0, we can find:
1.19.6 version will be installed from source code, it will report error.
However, 1.18.0 version is installed from a .whl file.
Python Install .whl File – Python Tutorial
We can find you also can installed other pymupdf version if its .whl file exist.