PyCurl 安装不成功

发布于 2024-12-02 14:37:57 字数 730 浏览 1 评论 0原文

尝试在我的系统 (MAC OS X) 中安装 pycurl 时,出现以下错误。不知道如何解决。请帮忙!

   nsh$ sudo easy_install pycurl
   Searching for pycurl
   Reading http://pypi.python.org/simple/pycurl/
   Reading http://pycurl.sourceforge.net/
   Reading http://pycurl.sourceforge.net/download/
   Best match: pycurl 7.19.0
   Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
   Processing pycurl-7.19.0.tar.gz
   Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tU3r7x/pycurl-7.19.0 /egg-dist-tmp-XBXPV8
   Using curl-config (libcurl 7.19.7)
   unable to execute gcc-4.2: No such file or directory
   error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1
    nsh$ 

While trying to install pycurl in my system (MAC OS X), I am getting the following error. No idea how to solve it. Please help !!!

   nsh$ sudo easy_install pycurl
   Searching for pycurl
   Reading http://pypi.python.org/simple/pycurl/
   Reading http://pycurl.sourceforge.net/
   Reading http://pycurl.sourceforge.net/download/
   Best match: pycurl 7.19.0
   Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
   Processing pycurl-7.19.0.tar.gz
   Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tU3r7x/pycurl-7.19.0 /egg-dist-tmp-XBXPV8
   Using curl-config (libcurl 7.19.7)
   unable to execute gcc-4.2: No such file or directory
   error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1
    nsh$ 

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

如歌彻婉言 2024-12-09 14:37:57

尝试使用:

# sudo env ARCHFLAGS="-arch i386 -arch x86_64" pip install pycurl

但在此之前,请安装 Xcode。现在它是免费的。

Try to use:

# sudo env ARCHFLAGS="-arch i386 -arch x86_64" pip install pycurl

But before that, install Xcode. Now it's free.

薄荷梦 2024-12-09 14:37:57

也许您应该尝试安装gcc-4.2

Perhaps you should try installing gcc-4.2?

短暂陪伴 2024-12-09 14:37:57

可能有效,具体取决于您是否实际安装了 gcc-4.2。

cd /usr/bin
ln -s gcc gcc-4.2

如果这不起作用(您没有有效版本的 gcc),则需要安装 Apple 开发者工具

您还可以在命令行输入 gcc 查看您安装的版本。

This might work, depending on whether or not you actually have gcc-4.2 installed.

cd /usr/bin
ln -s gcc gcc-4.2

If that doesn't do the trick (you don't have a valid version of gcc), you will need to install gcc-4.2 which comes with the Apple developer tools

You can also type gcc at the command line to see which versions you have installed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文