本文介绍了Pygame坏了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在已经在AGES上使用pygame了,从来没有出现这样的错误.
I have been using pygame for AGES now and never has it raised an error like this.
Traceback (most recent call last):
File "dodgeball.py", line 1, in <module>
import pygame
File "/Library/Python/2.7/site-packages/pygame/__init__.py", line 95, in <module>
from pygame.base import *
ImportError: dlopen(/Library/Python/2.7/site-packages/pygame/base.so, 2): Library not loaded:
@executable_path/../Frameworks/SDL.framework/Versions/A/SDL
Referenced from: /Library/Python/2.7/site-packages/pygame/base.so
Reason: unsafe use of @executable_path in /Library/Python/2.7/site-packages/pygame/base.so with restricted binary
有人告诉我问题是多个SDL库,但找不到任何重复的SDL库.
I've been told that the problem is multiple SDL libraries, but I can't find any duplicate SDL libraries.
推荐答案
Apple引入了系统完整性保护,作为开发人员,我们可能需要禁用它.
Apple has introduced System Integrity Protection, as developer we might need to disable it.
- 通过重新启动计算机并按住Command + R直到屏幕上出现Apple徽标,将Mac重启到恢复模式.
- 单击实用程序>终端.
- 在终端"窗口中,键入
csrutil disable
并按Enter. - 重新启动Mac.
- Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
- Click Utilities > Terminal.
- In the Terminal window, type in
csrutil disable
and press Enter. - Restart your Mac.
所有功劳归功于:) >>
All credit goes to :) >> https://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-max-os-x-el
这篇关于Pygame坏了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!