symbol not found in flat namespace ‘_FT_Done_Face’

symbol not found in flat namespace ‘_FT_Done_Face’

Problem

Sometimes while you are trying to run or migrate your django project which depends on reportlab package or easy-thumbnail which depends on reportlab or any other package which depends on reportlab. BOOM an error explode.

ImportError: dlopen({{your_path}}/venv/lib/python3.9/site-packages/reportlab/graphics/_renderPM.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_FT_Done_Face'

Reason

This is one of the common errors for who are using MacOS and Python3.9.

Please let me know in comments if you are using facing this problem with another OS or python version.

The reason is that reportlab is not able to find freetype library which render fonts.

Solution

Force pip to build reportlab package again and install it again using this command.

pip install reportlab --force-reinstall --no-cache-dir --global-option=build_ext

and this should fix the problem.

AHMED ELKHAYYAT
https://elkhayyat.me

I am a very keen individual that enjoys developing Python Programming Language. I have always loved computers and technology, ever since childhood. A team player who loves to work with other people on innovative projects and to take on challenges as an opportunity to grow as an individual in both a professional and personal capacity.

Leave a Reply

Select your currency
USD United States (US) dollar