9

Just started programming in python and pygames. Whenever I try running a py file with pygames, the pygames window will appear, but there will be absolutely nothing in it. No errors in the log, but nothing shows, it's just a gray screen. I tried running it on IDLE, and through the command line (I'm on a mac so I use the terminal)

And it's not just my programs that aren't showing anything, I've tried to run one of pygames examples, and it will still not display anything. For example, if I run the pygames alien example, the window will appear with a blank gray background. I'll hear the audio for the program, but no display.

Anything would help, I'm at a loss especially since no errors are showing in the log.

EDIT1: I'm using Python 3 (and I really need to keep using Python 3)

EDIT2: I'm using python 3.7. pygames version 1.9.4. The examples are with the pygames, they were downloaded together, so I assume it's for that version.

EDIT3: ok, my OS is Mojave 10.14. I've tried starting the application by: opening the file, running it on IDLE, and running it through the command line, none have worked. python2 is installed, but when I run the pygame it's a python3 file

Cjan
  • 143
  • 1
  • 6
  • What version of python are you running, and what do the examples expect? – Mars Nov 07 '18 at 02:53
  • Python 3 has many versions. What version is your Python3, and what version are the examples written for? – Mars Nov 07 '18 at 06:25
  • Please add a lot more details-- your OS, how you're starting the app, whether or not python2 is installed, anything else you think might help. – Mars Nov 08 '18 at 00:21
  • 1
    I've added more info to the question body – Cjan Nov 08 '18 at 01:26
  • On work PC so I can't check from here, but are you calling the app through Idle3/python3? And if you have multiple versions of Py3 installed, are you sure you're opening it through py3.7? (Or, from another point, have you tried calling it with other versions of Py3?) – Mars Nov 08 '18 at 01:48

2 Answers2

2

Known issue with Mojave - see their issue tracking: https://github.com/pygame/pygame/issues/555

toejough
  • 321
  • 2
  • 11
2

You can also install new pygame using pip install pygame=2.0.0.dev6. This worked in my case.

Samuel
  • 2,895
  • 4
  • 30
  • 45
regor
  • 27
  • 6