Python Forum
[PyGame] Image not found error - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Game Development (https://python-forum.io/forum-11.html)
+--- Thread: [PyGame] Image not found error (/thread-1089.html)



Image not found error - simiugor - Dec-02-2016

Hey guys,
I'm beginner in Python 3.5 and Pygame. With help of YouTube tutorials I'm trying to code my first very basic "game". I am using Mac OS and every time I try to add image (.png) to my game it writes error: Failed loading libpng.dylib: dlopen(libpng.dylib, 2): image not found
Can you help me please?


RE: Image not found error - metulburr - Dec-02-2016

try this
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi



RE: Image not found error - simiugor - Dec-02-2016

Sorry, maybe its bad question but.. where should I write that line?


RE: Image not found error - metulburr - Dec-02-2016

its a system command to install dependencies 

open a terminal and input that


RE: Image not found error - simiugor - Dec-02-2016

-bash: brew: command not found


RE: Image not found error - metulburr - Dec-02-2016

i dont even own a mac, so im not sure. I just googled your answer. And i googled your error as well to find this
http://stackoverflow.com/questions/20381128/how-to-install-homebrew-on-os-x


RE: Image not found error - simiugor - Dec-02-2016

Thank you so much! It worked!


RE: Image not found error - metulburr - Dec-02-2016

so is your original problem fixed or just installing brew?


RE: Image not found error - simiugor - Dec-02-2016

I installed brew and my problem is partly fixed. When I save image as .png or .jpeg it writes error but once I saved it as .gif it worked. Its fixed for me because I don't really care if its .png or .gif I am just glad it works.