Python Forum
[PyGame] Image not found error
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Image not found error
#1
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?
Reply
#2
try this
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
Recommended Tutorials:
Reply
#3
Sorry, maybe its bad question but.. where should I write that line?
Reply
#4
its a system command to install dependencies 

open a terminal and input that
Recommended Tutorials:
Reply
#5
-bash: brew: command not found
Reply
#6
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/20381...ew-on-os-x
Recommended Tutorials:
Reply
#7
Thank you so much! It worked!
Reply
#8
so is your original problem fixed or just installing brew?
Recommended Tutorials:
Reply
#9
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] Error: Couldn't open image DotGuy 2 7,110 May-18-2020, 06:19 PM
Last Post: DotGuy
  [PyGame] pygame image loading error BlueClaw 6 6,322 Dec-10-2019, 08:50 PM
Last Post: BlueClaw
  [pyGame] Load Image, Problem Found ! JamieVanCadsand 2 8,683 Sep-29-2017, 06:26 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020