OCRmyPDF: fatal error: qpdf/Constants.h - pip3 install ocrmypdf and pikepdf on ubuntu win10 subsystem failed
Hi,
there was a thread with the same problem that is closed meanwhile and did not solve my problem. I try to install ocrmypdf on ubuntu LTS 18.04 subsystem for Windows 10 I run into:
src/qpdf/annotation.cpp:11:10: fatal error: qpdf/Constants.h: No such file or directory #include <qpdf/Constants.h> ^~~~~~~~~~~~~~~~~~ compilation terminated.
and subsequent errors.
What can I do?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27
Try that:
python3 -m pip install --upgrade pipThen:
python3 -m pip install pikepdfPinned because this issue is common.
@frahlg your solution worked for me (
brew install qpdf), thank you!I was having the same situation (problems with Mac M1 chip)
Ended up here because of build problems on my Mac. Fixed it by installing qpdf manually with brew. https://ports.macports.org/port/qpdf/
I found this on Reddit. Solved my issue.
The compilation cannot succeed because it relies on your system having a particular library and the source code (or at least the description of the library’s interface), which is the header files it’s missing.
Probably, something like
apt-get install libqpdf-devwill solve your problem.For Arch Linux, installing
qpdfshould be enough.@brje pikepdf 2.0.0b1 and Python 3.9 should work now. You’d have to force pip to install pikepdf 2.0.0b1 since it’s a beta.