Question / Comment: Installing PyMuPDF with pip on alpine linux #1015
Replies: 18 comments 4 replies
-
I have no experience with docker unfortunately. All I can do is recommend you roughly follow the PyMuPDF wheel creation process on Linux machines of Travis CI. You error above shows that the used |
Beta Was this translation helpful? Give feedback.
-
I am not familiar with Alpine Linux, but |
Beta Was this translation helpful? Give feedback.
-
@cges30901 - thanks for stepping in here. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@kharann - I think you should dilligently verify
|
Beta Was this translation helpful? Give feedback.
-
How did you install mupdf (from Alpine Linux repository or you built from source)? What version of mupdf and Alpine Linux are you using? |
Beta Was this translation helpful? Give feedback.
-
@kharann - how are you doing ... any progress / success? |
Beta Was this translation helpful? Give feedback.
-
I decided to switch the docker image to Debian instead of using Alpine. I tried a few different things with little success on the alpine image. Thank you for the help nevertheless! It seems to work well with the Debian image tho! |
Beta Was this translation helpful? Give feedback.
-
Thank your for the feedback. |
Beta Was this translation helpful? Give feedback.
-
Alpine Linux uses musl libc, which is not compatible with |
Beta Was this translation helpful? Give feedback.
-
Would you kindly share the debian Dockerfile @kharann? |
Beta Was this translation helpful? Give feedback.
-
Quick update after fiddling around. I got it working by adding Here's the full file for reference:
|
Beta Was this translation helpful? Give feedback.
-
Check out this repo: https://github.com/jay-eff/mutool |
Beta Was this translation helpful? Give feedback.
-
there are already mupdf apk for alpine |
Beta Was this translation helpful? Give feedback.
-
We end up adapting the #!/bin/bash
set -euo pipefail
wget https://github.com/pymupdf/PyMuPDF/archive/1.18.6.tar.gz
tar -xzf 1.18.6.tar.gz && cd PyMuPDF-1.18.6
wget https://mupdf.com/downloads/archive/mupdf-1.18.0-source.tar.gz
tar -zxvf mupdf-1.18.0-source.tar.gz
cd mupdf-1.18.0-source
# replace files in mupdf source
cp ../fitz/_config.h include/mupdf/fitz/config.h
export CFLAGS="-fPIC"
make HAVE_X11=no HAVE_GLFW=no HAVE_GLUT=no prefix=/usr/local
make HAVE_X11=no HAVE_GLFW=no HAVE_GLUT=no prefix=/usr/local install
cd ..
python setup.py build
python setup.py install |
Beta Was this translation helpful? Give feedback.
-
Hi, this work for me, and only work with python:3.8.10 or greater and with Pymupdf:1.18.14: 1). Only if you don't have python installed: 2). Install dependencies:
3). Create Shortcut: 4). Install PymuPdf: Only if you want to do everything at the same time:
|
Beta Was this translation helpful? Give feedback.
-
The abovementioned setup has almost worked for me, but I had to add make and g++ (and have also added swig as said in the docs ) . The whole working setup looks like:
|
Beta Was this translation helpful? Give feedback.
-
anybody was able to run on 3.12-alpine? I'm trying to use pymupdf==1.24.11, tried all the above but haven't got it to work so far :( |
Beta Was this translation helpful? Give feedback.
-
Hi i keep trying to install PyMuPDF in a docker container running alpine linux.
I read around a bit and tried to add mupdf before pip installing without any success
But it seems like im getting some weird kind of wheel error? Any guidance on the issue??
Beta Was this translation helpful? Give feedback.
All reactions