-
Notifications
You must be signed in to change notification settings - Fork 606
can't build 1.16.1 - fatal error: fitz.h not exist #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you read the installation documentation of the manual and the hints on the homepage of the repo?
Your error means that the MuPDF source is not accessible - a clear sign that you missed one or more of the previous steps: |
pretty stupid installation :-D |
I ran into the same error on a freshly installed CentOS 8 while running
Prior to this following completed successfully:
Must I build pymudpdf from source and not using pip3? |
|
Thank you for your reply. |
$ pip3 install --upgrade pip |
Hi @JorjMcKie , correct me if I am wrong .Once I installed pymupdf, mupdf should get automatically downloaded in window and linux, but why I still encounter the issue that fitz.h not found |
No, this won't (and should not!) happen automatically. You must download and install MuPDF as a separate step prior to generating PyMuPDF from source. |
Thanks for the prompt reply. But I am able to use pymupdf in local drive
which is window without downloading mupdf in advance. But once I put it on
cloud, it fails.
…On Wed, 18 Nov 2020 at 8:49 PM, Jorj X. McKie ***@***.***> wrote:
Once I installed pymupdf, mupdf should get automatically downloaded in
window and linux
No, this won't happen automatically. You must download and install MuPDF
as a separate step prior to generating PyMuPDF from source.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#358 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGZLK3YQDWAUS4VDNPHHQEDSQO7HDANCNFSM4IVEZA2Q>
.
|
I have seen a similar problem earlier here: #430.
Maybe you can get ideas from that discussion.
Jorj
Von: susuusus<mailto:[email protected]>
Gesendet: Mittwoch, 18. November 2020 09:01
An: pymupdf/PyMuPDF<mailto:[email protected]>
Cc: Jorj X. McKie<mailto:[email protected]>; Mention<mailto:[email protected]>
Betreff: Re: [pymupdf/PyMuPDF] can't build 1.16.1 - fatal error: fitz.h not exist (#358)
Thanks for the prompt reply. But I am able to use pymupdf in local drive
which is window without downloading mupdf in advance. But once I put it on
cloud, it fails.
On Wed, 18 Nov 2020 at 8:49 PM, Jorj X. McKie ***@***.***> wrote:
Once I installed pymupdf, mupdf should get automatically downloaded in
window and linux
No, this won't happen automatically. You must download and install MuPDF
as a separate step prior to generating PyMuPDF from source.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#358 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGZLK3YQDWAUS4VDNPHHQEDSQO7HDANCNFSM4IVEZA2Q>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#358 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB7IDIUSXAWX6NTLF27KRNTSQPATNANCNFSM4IVEZA2Q>.
|
Maybe you need to upgrade pip first
|
For anyone trying to install mupdf on Apple's M1 or any arm based architecture, there is no binary available for arm and pip will try to build from source. Until the maintainers here provide system requirements to install before pip, this will always fail. |
my m1 solution:
|
@sailist Have you been able to install pymupdf in a docker container (e.g. based on
|
@mr-bjerre In the case of Docker, you need to check if your image is using an image that is not based on the M1 architecture, so you won't have any problems installing packages that don't work on M1. |
I solved it. See my solution here |
on MBPro M1 |
@charanjit-singh On an ARM M1 Mac, with native homebrew & pip in place, these steps should work (the second step being replaced by pip install pymupdf as soon as the referenced PR reach PyPI):
|
on Mac M1, I was getting: |
My solution(for alpine 3.16): ln -s /usr/lib/libjbig2dec.so.0 /usr/lib/libjbig2dec.so python -m pip install --upgrade pip |
I want build PyMuPDF as usually i build python-packages, ergo:
but i can build that, because fitz.h missing
log:
running build
running build_py
running build_ext
building 'fitz._fitz' extension
swigging fitz/fitz.i to fitz/fitz_wrap.c
swig -python -o fitz/fitz_wrap.c fitz/fitz.i
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/fitz
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=haswell -mtune=haswell -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/mupdf -I/usr/local/include/mupdf -I/usr/include/python3.7m -c fitz/fitz_wrap.c -o build/temp.linux-x86_64-3.7/fitz/fitz_wrap.o
fitz/fitz_wrap.c:2732:10: fatal error: fitz.h: directory or file does not exist
2732 | #include <fitz.h>
| ^~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
1.16.1 and 1.14.18 tested and both are affected...
maybe stupid question, but i found no solution....
The text was updated successfully, but these errors were encountered: