SirSmokes SirSmokes - 5 months ago 75
Python Question

Pygame broke down?

I have been using pygame for AGES now and never has it raised an error like this.

Traceback (most recent call last):
File "", line 1, in <module>
import pygame
File "/Library/Python/2.7/site-packages/pygame/", line 95, in <module>
from pygame.base import *
ImportError: dlopen(/Library/Python/2.7/site-packages/pygame/, 2): Library not loaded:
Referenced from: /Library/Python/2.7/site-packages/pygame/
Reason: unsafe use of @executable_path in /Library/Python/2.7/site-packages/pygame/ with restricted binary

I've been told that the problem is multiple SDL libraries, but I can't find any duplicate SDL libraries.


Apple has introduced System Integrity Protection, as developer we might need to disable it.

  1. Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
  2. Click Utilities > Terminal.
  3. In the Terminal window, type in csrutil disable and press Enter.
  4. Restart your Mac.

All credit goes to :) >>