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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Select your currency
USD United States (US) dollar