-
-
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
Error: cannot import name '_imagingft' #7949
Comments
Hi. You are missing a dependency, as you are building from source. Please try the following
For your pypy3 warnings, I would suggest you uninstall Pillow, upgrade pypy3's pip and try again - but it's not relevant if you are ultimately running |
You are mixing a bunch of different tools here. You should avoid using pip directly because it is not clear which Python version will be used. Instead use
What is your CPU architecture? I don't know if anyone has tried installing Pillow with PyPy on arm before. Edit: Actually, arm64 does seem to be covered by our CI, but not 32-bit arm. |
spino@api: same error this is running on raspberrry pi2 |
I've realised I was wrong - you're not installing from source for python3. I suspect you're using piwheels like #5818. Could you try this?
|
same error, i tryed to reinstall the OS and the same error occurred during the installation of pillow WARNING: Generating metadata for package Pillow produced metadata for project name unknown. Fix your #egg=Pillow fragments. the only onw that work is the 10.1.0 but there is always this error Error: cannot import name '_imagingft' from 'PIL' (/home/spino/.local/lib/python3.10/site-packages/PIL/init.py) spino@api:~$ sudo apt-get install libfreetype6-dev Reading package lists... Done Running kernel seems to be up-to-date. Failed to check for processor microcode upgrades. Restarting services... No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. spino@api:~$ python3 -m pip install Pillow --no-binary :all: |
Could you try upgrading pip? python3 -m pip install --upgrade pip
python3 -m pip uninstall Pillow
python3 -m pip install Pillow --no-binary :all: Also, why do you keep cancelling the operation? |
i have tryed something and instaled a bounch of package, now is working but i have a different error when i run the code spino@api:~/cam$ python3 main.py |
I expect that is trying to tell you that the path to the font is incorrect. |
fixed, now it is writing, no error but i wonder if there is a way to get the height that the text will cover |
See |
ok now it works fine |
@SPIN04 Could you please be a lot more specific? I am encountering this error, and I'd like to know how to fix it. What do I need to install, specifically? |
@bryankaplan Can you import
|
@aclark4life Negative.
|
OK then, installation issue. For whatever it's worth, my macOS wheel appears to be dynamically linked to Homebrew deps
|
Agreed, it's an installation issue, and I'm probably missing some dependency. I'm on Void Linux. I already had both harfbuzz-devel and freetype-devel installed. |
In most cases you don't need to install anything other than just Pillow, and I usually find that the exceptions are easiest to diagnose starting from the beginning. So could you please create a new issue, making sure to provide your OS version and output from running |
@nulano Thank you. Done ^. |
Right, I had to go look it up. I forgot the most important difference between static and dynamic linking is linking-at-compile-time vs. linking-at-runtime. So in my example, if I were to unzip the Pillow wheel, I'd find the dylibs whose path begins with |
i'm trying to manipulate the image adding a text overlay, the overlay of image work fine but the text dosn't work giving me this error
Error: cannot import name '_imagingft' from 'PIL' (/home/spino/.local/lib/python3.10/site-packages/PIL/init.py)
also during the installation i got a bunch of warnign
then i installed pillow with pip install pillow==10.3.0
so i tried the code to put the overlay and the error showed up
What are your OS, Python and Pillow versions?
OS: Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
Python: 3.10.12
Pillow: 10.3.0
The text was updated successfully, but these errors were encountered: