Failure when installing PyMuPDF on IBM i.

Issue #69 resolved
Jason Olson created an issue

So I’m trying to install the Python library PyMuPDF on IBM i. The error that I receive is,

unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1

I’ve verified that I’ve already installed all the gcc compilers. How do I go about troubleshooting why this isn’t installing?

Jason

Comments (10)

  1. Jason Olson reporter

    Ya know I HATE when I remember to do that correctly!

    OK so I took care of that problem and now I’m getting the following,

    lude/mupdf -I./mupdf/thirdparty/zlib -I/QOpenSys/pkgs/include/python3.6m -c fitz/fitz_wrap.c -o build/temp.os400-powerpc64-3.6/fitz/fitz_wrap.o

    fitz/fitz_wrap.c:2732:18: fatal error: fitz.h: No such file or directory
    #include <fitz.h>
    ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ERROR: Failed building wheel for PyMuPDF

    Looks like it can’t find fitz.h but I would have thought that would come with the package itself.

    Jason

  2. Kevin Adler

    It seems as though PyMuPDF is a wrapper around MuPDF. You’ll need to download and build that first. (The PyMuPDF README even mentions it: “To do this, you must download and generate MuPDF”)

  3. Jason Olson reporter

    Strange since you don’t have to do that in Windows. I just installed the PyMuPDF library using PIP and everything has been working. So I’ll probably have to find another option.

  4. Kevin Adler

    From the PyMuPDF readme linked above:

    For all Windows and (thanks to our user @jbarlow83!) for the major Mac OSX and Linux versions we offer wheels in the download section of PyPI.

    (wheels are pre-built binary Python packages)

    You’ll tend to find that software which has compiled code is pre-built for Windows because getting a build environment set up on Windows is torture and there’s relatively few versions to support. Due to the various different Linux distributions, there usually aren’t prebuilt Linux packages, though that’s improving with the “manylinux1” platform support. I’ve seen macOS pre-built packages as well, but they tend to be sparse.

    Basically outside of Windows, if there’s native code involved you’ll probably have to build it yourself.

  5. Jason Olson reporter

    yep I kinda found that out after I was reading into it further.

    Anyway I was able to do what I wanted with another Python library, just had to jump through a few more hoops.

    I do appreciate your assistance!

    Jason

  6. Jason Olson reporter

    I already had PyPDF4 installed to password protect existing PDFs. So I just used it to merge PDFs.

    Also PDFRW seems to work really well to merge PDFs with a watermark.

    Jason

  7. Log in to comment