python-在Mac上将Pygame安装到Enthought版本中
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了python-在Mac上将Pygame安装到Enthought版本中,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3018字,纯文字阅读大概需要5分钟。
内容图文
![python-在Mac上将Pygame安装到Enthought版本中](/upload/InfoBanner/zyjiaocheng/691/ec20455ab3244af2b050c80a8d430721.jpg)
在Mac上安装Pygame时,有许多未解决的问题,但我将在这里询问我的具体问题,并希望找到答案.
我在将Pygame安装到Mac上时遇到了难以置信的困难.我使用的是Enthought版本EPD 7.3-2 32位,这是我的默认框架,因此,如果在终端提示符下键入python,则会得到:
$python
Enthought Python Distribution (EPD) free version -- www.enthought.com
Version: 7.3-2 (32-bit)
我已经使用Pip 1.2.1成功安装了其他模块到该版本,没有任何问题.我的机器上安装了Xcode 4.5.2,但出现gcc错误.
有任何想法吗?
这是跟踪:
$pip install Pygame
Downloading/unpacking Pygame
Running setup.py egg_info for package Pygame
warning: no files found matching 'readme.txt'
no previously-included directories found matching '*/CVS'
no previously-included directories found matching '*/*/CVS'
Installing collected packages: Pygame
Running setup.py install for Pygame
building 'pygame.font' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -DNDEBUG -g -O3 -arch i386 -Ddarwin -I/Library/Frameworks/SDL.framework/Versions/Current/Headers -I/Library/Frameworks/SDL_ttf.framework/Versions/Current/Headers -I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -c src/font.c -o build/temp.macosx-10.5-i386-2.7/src/font.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
Complete output from command /Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/7p/wns1bszn1gq0zm3z2j_tdkdw0000gn/T/pip-build/Pygame/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/7p/wns1bszn1gq0zm3z2j_tdkdw0000gn/T/pip-478PM0-record/install-record.txt --single-version-externally-managed:
running install
running build
running build_py
running build_ext
building 'pygame.font' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -DNDEBUG -g -O3 -arch i386 -Ddarwin -I/Library/Frameworks/SDL.framework/Versions/Current/Headers -I/Library/Frameworks/SDL_ttf.framework/Versions/Current/Headers -I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -c src/font.c -o build/temp.macosx-10.5-i386-2.7/src/font.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/7p/wns1bszn1gq0zm3z2j_tdkdw0000gn/T/pip-build/Pygame/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/7p/wns1bszn1gq0zm3z2j_tdkdw0000gn/T/pip-478PM0-record/install-record.txt --single-version-externally-managed failed with error code 1 in /var/folders/7p/wns1bszn1gq0zm3z2j_tdkdw0000gn/T/pip-build/Pygame
Storing complete log in /Users/jchirico/.pip/pip.log
解决方法:
您是否已安装Xcode 4.5的命令行工具组件?启动Xcode.app,然后选择“偏好设置”->下载->组件,然后单击安装或更新.这将在/usr/bin等传统位置中安装或更新构建工具和系统头.
内容总结
以上是互联网集市为您收集整理的python-在Mac上将Pygame安装到Enthought版本中全部内容,希望文章能够帮你解决python-在Mac上将Pygame安装到Enthought版本中所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。