与El Capitan系统有关的Python Pygame OSx错误



我在OSx ElCapitan上安装PyGame,系统安装2.7,Brew安装Python3。brew安装Python3与配合良好

sudo pip3 install hg+http://bitbucket.org/pygame/pygame

但是

sudo pip install hg+http://bitbucket.org/pygame/pygame 

遇到以下错误

running install_headers
creating /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pygame

error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pygame': Operation not permitted

Rolling back uninstall of pygame
Command "/usr/bin/python -c "import setuptools, tokenize;
__file__='/tmp/pip-wepMKN-build/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" 
install --record /tmp/pip-sWpHWA-record/install-record.txt 
--single-version-externally-managed --compile" 
failed with error code 1 in /tmp/pip-wepMKN-build

我认为这与El Capitan的新系统完整性保护有关。之前所有的东西都经过了更新和篡改,所以系统运行良好。

我相信,任何关于我如何克服这一点的帮助都会很棒,对很多人都有帮助。

感谢

Chris

@Arthur提供了一个链接,链接到一个关于这个问题的可能解决方案的线程,尽管我不确定我是否准备好关闭SIP,所以我个人会选择用户在上述线程上未经批准的答案建议的仅安装。

最新更新