Skip to content Skip to sidebar Skip to footer

Failure On Import Pygame.font

import pygame works fine for me, but import pygame.font fails with the error: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyga

Solution 1:

What happened was libpng wasn’t installed as a dependency for some reason. So I grabbed the 64 bit Mac OS X binary at http://www.libpng.org/pub/png/libpng.html. But the version was 1.5.4, which is old.

To resolve this, I deleted all of the libpng15 files from usr/local/lib then downloaded the source for 1.5.18 from http://sourceforge.net/projects/libpng/files/libpng15/1.5.18/ and:

./configure [--prefix=/path] make check make install

to install.

Issue resolved. I am going to leave this here in case others have the same problem, since I googled the error quite a bit and couldn’t find a solution.

Post a Comment for "Failure On Import Pygame.font"