Installation in TrueNAS (FreeBSD) Jail #1783
-
Hi all, Trying to get PyMuPDF running in a TrueNAS / FreeBSD jail. When executing python -m pip install --upgrade pymupdf I get the following:
Doing some googling, this seemed to be an issue with mupdf not being installed. So, I tried that by executing python -m pip install --upgrade mupdf which returns "error: metadata-generation-failed". I'm using python 3.7. Thoughts on what might be happening here? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 2 replies
-
Could you say what version of PyMuPDF pip was trying to install, e.g. post the full output? Your error looks like what one might see when compiling a 1.19.x release, not the current 1.20.1 release. (I'm not sure why your simple pip command would be trying to install an old release like that though.) 1.20.x sdist already contains mupdf, so there should be no problem with finding mupdf's |
Beta Was this translation helpful? Give feedback.
-
Apologies, after having seen the log recently mentioned in #1563, i think i have a better understanding about how things can go wrong in the way you describe, when building 1.20.x from source. It looks like a workaround may be to do Could you try that and report back? |
Beta Was this translation helpful? Give feedback.
-
Thanks for responding! I successfully ran pip install wheel, but pip install pymupdf still fails. Output attached. It looks like it's still the same basic error:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for posting the full output, i think we're making progress. Pre-installing To make the build of mupdf succeed, i think we need to have I'vee just pushed a variation of @wenheping patch, plus a change to make The current situation is:
|
Beta Was this translation helpful? Give feedback.
-
Following up again. I did a git clone from the repo, and ran python setup.py install >& setup.txt and got the following:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for testing. This is a failure to build mupdf; the mupdf build scripts unfortunately hard-code the use of bash, so there's no way round this other than to install it on your machine before building PyMuPDF. |
Beta Was this translation helpful? Give feedback.
-
I should have seen that, honestly. Sorry for that as it's pretty obvious. Making progress, but now what I set is an error on what appears to be truetype assets?
|
Beta Was this translation helpful? Give feedback.
-
No problem at all. Is the new error while building mupdf, or later on when building pymupdf? Could you post the full output if you still have it? |
Beta Was this translation helpful? Give feedback.
-
Yes, here it is (Part 1):
|
Beta Was this translation helpful? Give feedback.
-
Part 2:
|
Beta Was this translation helpful? Give feedback.
-
Success! I cleaned everything up like you said and reran the build. Ended up getting this:
So, I ran pip install harfbuzz and reran setup, and voila! looks like I have a successful build! |
Beta Was this translation helpful? Give feedback.
-
Marking this as answered. |
Beta Was this translation helpful? Give feedback.
Marking this as answered.