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
macOS 10.13 High Sierra - ImportError: pikepdf's extension library failed to import #186
Comments
Lots of things can cause that and it's very platform specific. |
Are you referring to any specific version or wheel I should try? Thanks for your quick response. Im running it under OSX, with Ubuntu only pip install works great |
I'm not sure what this means. Please tell me what you are trying to get to working that is not working. What OS, install method, processor arch? What steps did you follow? |
Operating system - MacOS high Sierra 10.13.3 I Installed it as I also installed qpdf https://github.com/qpdf/qpdf via source installation method! The error I am getting is - File "/Users/username/.virtualenvs/cloudpdf/lib/python3.8/site-packages/pikepdf/init.py", line 18, in I have trying setting up same over an Ubuntu OS and it worked fine, Any thoughts? |
You may have better luck using homebrew to install qpdf rather than build it from source. Would also be interesting to see if homebrew ocrmypdf works, since ocrmypdf bundles pikepdf. |
Tried installing both via brew, it asks me to install via installation goes ok, but then the same error |
I'm having the same issue, also on macOS. This is in an otherwise empty venv where I just did OS: macOS High Sierra 10.13.6 A previously created virtual environment works fine with pikepdf version 2.2.0, same python version (installed via homebrew). |
Both of these issues are with High Sierra / 10.13. Homebrew now only supports 10.13 on a best effort basis, and they'll probably drop 10.14 soon too. I suspect the breakage is in there somewhere. It may work to do a source build of qpdf and make install it, then source build pikepdf and make sure it can find the source build of qpdf. pikepdf does request a 10.9 compatible ABI in its build, but that doesn't guarantee it will work. Bottom line is you'll need to upgrade because third parties are dropping support for 10.13. |
Thanks for the reply. Unfortunately I'm building an app using pyinstaller and many of my users are running older systems, so the older I can support the better. I did some tests and found that pikepdf v2.8.0 works; v2.8.0.post1 does not. I don't know anything about building wheels or github actions, but is it possible this is the culprit? If this is a #wontfix, that's fine - I can continue using an older version of pikepdf for my mac build. |
That's good detective work. It's quite possible moving to GHA and the worker from 10.14 to 10.15 made the difference. Although I don't know specifically why since it implies 10.15 lost the ability to generate 10.13-compatible binaries somehow, or isn't selecting the option that allows it to. Azure Pipelines still has a 10.14 image but it's deprecated. GitHub Actions has already dropped 10.14, so I can't switch to it (or I would, and it would likely fix this). What it comes down to is, the window is closing for 10.13 support. Not so much #wontfix as #cantfix. If you can build qpdf and pikepdf from source on your 10.13 machine everything should work. In my opinion if you're packaging for Pyinstaller, it makes more sense to build everything from source rather than rely on wheels. Use the environment variable |
I understand, I've run into other problems with the obsolescence of my old Mac. I even had to coerce it to upgrade past El Capitan, so I'm running a not-quite-vanilla version of High Sierra anyways. I'll look in to building from source. @jbarlow83, do you have a PayPal link or something I could use to send you a donation? The sewing community (users of my PDFStitcher app) is very generous and I'd like to send some of the appreciation upstream. |
@cfcurtis Thanks for your generous offer. Please send a contribution to OCRmyPDF, which has a sponsor page set up - I maintain both projects. This is the first time pikepdf has attracted contributions :). I read my own documentation and re-learned that pikepdf v2.0.0 officially ended compatibility for 10.14. I had forgotten. Support for 10.13 was never actually promised and only worked by fluke. (I sympathize. I still have a machine I need to move off of 10.14. And you can pry my late 2012 Macbook Pro Retina from my cold dead hands - or at least offer me a truly superior model, because in my opinion Apple hasn't exceeded it in 9 years.) |
I just ran into the same issue trying to use Just to document, I was able to work around the problem by using MacPorts, where they have installation packages for both The following steps should do the trick:
The MacPorts version is a few releases behind. As of this writing, they have |
While using pikepdf along with Django projects its throwing -
ImportError: pikepdf's extension library failed to import
. Any ideas if I am missing anything, I did built the qpdf repo as well.The text was updated successfully, but these errors were encountered: