0

I am learning how to use the pygame module on python 3.5 using macosx (High Sierra). I have the module installed but keep getting an error message every time I initiate the display. Example:

import pygame
screen = pygame.display.set_mode((1000,1000)) #dimensions can be 
anything

(Error I get)
AttributeError: module 'MacOS' has no attribute 'WMAvailable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/user1/Documents/pygamet/pygametest.py", line 3, in 
<module>
screen = pygame.display.set_mode((1000,1000))
SystemError: <built-in function set_mode> returned a result with an 
error set

The error persists no matter what I do (adding pygame.init() before it, etc.)

I know pygame might not be able to run on python3.5, but I have seen it work before on the same model computer as I am using.

Max
  • 434
  • 1
  • 3
  • 13
  • How did you install pygame? – skrx Dec 12 '17 at 14:27
  • I have tried multiple ways suggested online, including `sudo pip3.5 install pygame`, and directly downloading it and installing using the link – Max Dec 12 '17 at 15:11
  • I don't see a whl for mac os and Python 3.5 on [PyPi](https://pypi.python.org/pypi/Pygame). Perhaps it works with Python 3.6. – skrx Dec 12 '17 at 15:16
  • Unfortunately, gives me the same error. It's very peculiar. – Max Dec 12 '17 at 16:47
  • `PyGame` uses `SDL 1.2` library (C/C++) - maybe you have to install it manually. [Home page for SDL](http://libsdl.org/) – furas Dec 12 '17 at 19:12
  • *"directly downloading it and installing using the link"* How exactly did you install it? Have you tried to install the Python 3.6 pygame version with `pip3` as well? People had often had trouble with pygame on mac os in the past, but I thought that was over. Perhaps you really have to install the dependencies (SDL) manually. – skrx Dec 13 '17 at 03:12
  • Ok, tried that, same error. I've analyzed the pygame documents and found an error in a code that I'm trying to fix. – Max Dec 13 '17 at 12:01

0 Answers0