Python、GCC导致模块安装失败

发布于 2024-12-20 10:56:21 字数 1719 浏览 3 评论 0原文

每次我尝试安装 Python 模块(通过 easy_install 或 python setup.py install)时,安装都会失败并显示:

    unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

帮助我

系统:安装了 XCode 4 的 Mac OSX 运行 Lion

更新:这是尝试安装 pygame 时的输出:

    familys-imac:~ Paul-Arthur$ easy_install pygame
    Searching for pygame
    Reading http://pypi.python.org/simple/pygame/
    Reading http://www.pygame.org/
    Reading http://www.pygame.org/download.shtml
    Best match: pygame 1.9.1release
    Downloading http://www.pygame.org/ftp/pygame-1.9.1release.zip
    Processing pygame-1.9.1release.zip
    Running pygame-1.9.1release/setup.py -q bdist_egg --dist-dir /var/folders/y7/wskjhyr55_sg4n0w7c8qvrpm0000gp/T/easy_install-tioF5H/pygame-1.9.1release/egg-dist-tmp-gxSl_1


    WARNING, No "Setup" File Exists, Running "config.py"
    Using Darwin configuration...

    Hunting dependencies...
    Framework SDL found
    Framework SDL_ttf found
    Framework SDL_image found
    Framework SDL_mixer found
    Framework smpeg not found
    PNG     : found
    JPEG    : found
    SCRAP   : not found
    PORTMIDI: not found
    Framework CoreMidi found

    If you get compiler errors during install, doublecheck
    the compiler flags in the "Setup" file.


    Continuing With "setup.py"
    warning: no files found matching 'readme.txt'
    no previously-included directories found matching '*/CVS'
    no previously-included directories found matching '*/*/CVS'
    unable to execute gcc-4.0: No such file or directory
    error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

Each time I try to install a Python module (via easy_install or python setup.py install), the installation fails with:

    unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

Help Me

System: Mac OSX running Lion with XCode 4 installed

Update: here is the output when trying to install pygame:

    familys-imac:~ Paul-Arthur$ easy_install pygame
    Searching for pygame
    Reading http://pypi.python.org/simple/pygame/
    Reading http://www.pygame.org/
    Reading http://www.pygame.org/download.shtml
    Best match: pygame 1.9.1release
    Downloading http://www.pygame.org/ftp/pygame-1.9.1release.zip
    Processing pygame-1.9.1release.zip
    Running pygame-1.9.1release/setup.py -q bdist_egg --dist-dir /var/folders/y7/wskjhyr55_sg4n0w7c8qvrpm0000gp/T/easy_install-tioF5H/pygame-1.9.1release/egg-dist-tmp-gxSl_1


    WARNING, No "Setup" File Exists, Running "config.py"
    Using Darwin configuration...

    Hunting dependencies...
    Framework SDL found
    Framework SDL_ttf found
    Framework SDL_image found
    Framework SDL_mixer found
    Framework smpeg not found
    PNG     : found
    JPEG    : found
    SCRAP   : not found
    PORTMIDI: not found
    Framework CoreMidi found

    If you get compiler errors during install, doublecheck
    the compiler flags in the "Setup" file.


    Continuing With "setup.py"
    warning: no files found matching 'readme.txt'
    no previously-included directories found matching '*/CVS'
    no previously-included directories found matching '*/*/CVS'
    unable to execute gcc-4.0: No such file or directory
    error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文