gpt4 book ai didi

python - mac os 中的 pygame 安装问题

转载 作者:行者123 更新时间:2023-12-05 07:43:42 24 4
gpt4 key购买 nike

我有以下安装 pygame 包的问题。

In file included from src/_numericsurfarray.c:23:
src/pygame.h:106:10: fatal error: 'SDL.h' file not found
#include <SDL.h>
^
1 error generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

系统信息

  • Mac OS-10.9.2
  • python 版本- Python 2.7.5::Anaconda 1.6.1 (x86_64)

任何建议将不胜感激?谢谢。

最佳答案

在这里(OSX Mavericks)我能够以这种方式安装:

brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
pip install https://bitbucket.org/pygame/pygame/get/default.tar.gz

(“默认”分支正在提交 e3ae850 现在)

来源:https://bitbucket.org/pygame/pygame/issue/139/sdlh-not-found-even-thought-it-exists#comment-3822470

也请参阅其他 StackOverflow 问题:PyGame in a virtualenv on OS X with brew?

关于python - mac os 中的 pygame 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43508242/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com