Python error "pygame.error: Couldn't open pygame.png"

+1 vote

I'm trying to build the snake game using pygame. I'm following this tutorial.

I end up with the following error:

pygame.error: Couldn't open pygame.png

Jun 19, 2019 in Python by Jinu
627 views
yea I'm having a similar experience as well. I've tried different images. Please can someone be of any assistance
Hi @juno,

Can you please share your directory structure(where the code you are executing is saved)?

You usually get this error when the package i.e. pygame, in this case, is installed in a different directory.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
0 answers

Python error "pygame.error: Couldn't open pygame.png"

I'm trying to build a game using ...READ MORE

Jun 18, 2019 in Python by Harsha
170 views
0 votes
1 answer

Python pygame error : Failed loading libpng.dylib: dlopen(libpng.dylib, 2): image not found

Try installing libpng You can do it with ...READ MORE

answered May 31, 2019 in Python by SDeb
• 13,230 points
158 views
0 votes
1 answer

Python error "ImportError: No module named pygame.locals"

You need to download and install the ...READ MORE

answered Jun 18, 2019 in Python by Greg
692 views
0 votes
1 answer

Python error "ValueError: size needs to be (int width, int height)" while using pygame.Surface

pygame.Surface takes in integer values for building ...READ MORE

answered Jun 19, 2019 in Python by Varsha
329 views
+2 votes
2 answers

Error while printing hello world in python.

You must be trying this command in ...READ MORE

answered Mar 31, 2018 in Python by GandalfDwhite
• 1,320 points
196 views
0 votes
1 answer

Create and open a file in Python

file = open('text.txt', 'w+) READ MORE

answered May 24, 2018 in Python by Nietzsche's daemon
• 4,260 points
82 views
0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 652 views
0 votes
0 answers
+4 votes
6 answers