-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ImportError: cannot import name '_imagingft' from 'PIL' #8273
Comments
Have you tried the void linux binary ? |
|
If you're installing from source (which you are, since you used
Good point. @bryankaplan Does running the following produce the same output as your from PIL import features
features.pilinfo() |
@aclark4life That's v10.4, and I need 9.5.
@Yay295 Yes, it is. This code was extracted from the larger project to demonstrate the problem. But I tried installing ipython in the venv, just to be sure, and indeed the |
@nulano They're 100% identical. (I |
Ok, I've managed to reproduce in a Docker container. You probably tried to install Pillow before installing freetype-devel, which didn't work:
Even if you then install freetype-devel and try to install Pillow in a new venv, it will use a cached wheel:
You have to add a parameter to pip to ask it to ignore the cached wheel (
Does that help? |
@nulano Thank you! I knew as soon as I started reading your thought that it was probably the answer, and I started typing this response before the test was complete. Test succeeded. Thank you so much! |
Goal
Ultimately I'm trying to run detectron2. I've isolated the Pillow problem separate from detectron2, but that goal impacts my installation, as noted below.
Steps to Reproduce
On Void Linux:
Whoa, what's up with that
pip install
line?--no-binary :all:
based on advice given in Error: cannot import name '_imagingft' #7949.Expected Result
_imagingft
is successfully imported.Observed Result
ImportError: cannot import name '_imagingft' from 'PIL'
OS, Python and Pillow versions
python3 -m PIL --report
output:Done, above.
Thoughts
I reckon I'm probably missing a dependency, but I don't know what. I've tried installing
freetype-devel
,libjpeg-turbo-devel
, andlibraqm-devel
to no avail.The text was updated successfully, but these errors were encountered: