Skip to content
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

fatal error: python.h: No such file or directory & AttributeError: 'FreeTypeFont' object has no attribute 'getsize' #395

Open
dilora011 opened this issue Sep 4, 2023 · 2 comments

Comments

@dilora011
Copy link

dilora011 commented Sep 4, 2023

_fatal error: python.h: No such file or directory

AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

@dilora011
Copy link
Author

dilora011 commented Sep 5, 2023

fatal error: python.h: No such file or directory
1 | #include <python.h>

solution

one should add the path in Ubuntu. Open python_headers.h and replace
#include <Python.h>
----------------with------------
#include <python3.11/Python.h> #or whatever python version path you are using

AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

solution

include in the requirement.txt file : Pillow==9.5.0

pip install Pillow==9.5.0 #or just install it through pip

@manuelding
Copy link

fatal error: python.h: No such file or directory 1 | #include <python.h>

solution

one should add the path in Ubuntu. Open python_headers.h and replace #include <Python.h> ----------------with------------ #include <python3.11/Python.h> #or whatever python version path you are using

AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

solution

include in the requirement.txt file : Pillow==9.5.0

pip install Pillow==9.5.0 #or just install it through pip

python=3.9.16
Pillow==9.5.0
it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants