求助:雪豹下安装pycurl出错

2010-07-23 10:26:29 +08:00
 Htom
我想尝试tornado, 但它需要pycurl支持, 悲剧的是在我的雪豹下死活搞不定, 最后都是import pycurl出错, 不知道谁有过成功安装的经验? 谢谢!
7273 次点击
所在节点    Python
18 条回复
kaid
2010-07-23 11:52:47 +08:00
请您附上错误信息
Htom
2010-07-23 11:59:33 +08:00
Downloading http://pycurl.sourceforge.net/download/pycurl-7.16.2.1.tar.gz
Processing pycurl-7.16.2.1.tar.gz
Running pycurl-7.16.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ddqwtH/pycurl-7.16.2.1/egg-dist-tmp-k76W2Y
Using curl-config (libcurl 7.19.7)
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.4u.sdk
Please check your Xcode installation
cc1: error: unrecognized command line option "-Wno-long-double"
cc1: error: unrecognized command line option "-Wno-long-double"
lipo: can't figure out the architecture type of: /var/tmp//ccsfioUR.out
error: Setup script exited with error: command 'gcc' failed with exit status 1
Htom
2010-07-23 12:00:12 +08:00
xcode 装了, 3.2.3版本
kaid
2010-07-23 12:09:38 +08:00
光盘里有10.4sdk的pkg,装上再试试吧
Htom
2010-07-23 14:55:44 +08:00
OK, 谢谢, 回家后去试试
Livid
2010-07-23 16:03:03 +08:00
是用 MacPort 安装的吗?
Htom
2010-07-23 20:49:54 +08:00
@livid 不是, 我卸载了macport, 改用Brew了,

现在的新错误是

Searching for setuptools
Best match: setuptools 0.6c11
Processing setuptools-0.6c11-py2.5.egg
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.5/bin
Installing easy_install-2.5 script to /Library/Frameworks/Python.framework/Versions/2.5/bin

Using /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg
Processing dependencies for setuptools
Finished processing dependencies for setuptools
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-B6HYMf/pycurl-7.19.0/egg-dist-tmp-eogFUE
Using curl-config (libcurl 7.19.7)
cc1: error: unrecognized command line option "-Wno-long-double"
cc1: error: unrecognized command line option "-Wno-long-double"
lipo: can't figure out the architecture type of: /var/tmp//cckItsY6.out
error: Setup script exited with error: command 'gcc' failed with exit status 1
Htom
2010-07-23 20:50:34 +08:00
补充一下, 10.4sdk的pkg已经安装?

@livid 你是在macport下安装的吗?
Livid
2010-07-23 20:52:27 +08:00
MacPort 很好用,问题也少。

我一直都是用 MacPort 安装各种软件。
kaid
2010-07-24 17:49:25 +08:00
应该是libcurl和pycurl版本不兼容。尝试自己写个formula brew个7.19.0版的libcurl吧
kaid
2010-07-24 18:15:14 +08:00
如果再出什么问题的话跑一下test suite看卡哪里fail了吧。
Htom
2010-07-24 20:31:15 +08:00
here is the new information:

Searching for setuptools
Best match: setuptools 0.6c11
Processing setuptools-0.6c11-py2.5.egg
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.5/bin
Installing easy_install-2.5 script to /Library/Frameworks/Python.framework/Versions/2.5/bin

Using /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg
Processing dependencies for setuptools
Finished processing dependencies for setuptools
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-edhs1e/pycurl-7.19.0/egg-dist-tmp-AQWFpe
Using curl-config (libcurl 7.19.7)
cc1: error: unrecognized command line option "-Wno-long-double"
cc1: error: unrecognized command line option "-Wno-long-double"
lipo: can't figure out the architecture type of: /var/tmp//ccZS1UyF.out
error: Setup script exited with error: command 'gcc' failed with exit status 1
kaid
2010-07-24 22:21:50 +08:00
ach, gerade zu hause angekommen..........ein klein bisschen betrunken. deine libcurl verison ist noch 7.19.7......
Livid
2010-07-24 22:24:58 +08:00
装一个 MacPorts 就所有问题都解决了。。。
kaid
2010-07-25 11:04:37 +08:00
@livid 折腾是无穷尽的;)
Htom
2010-07-26 17:37:40 +08:00
@kaid 握个手
kaid
2010-07-26 20:16:38 +08:00
@Htom 握手:)。打开python interactive shell看看编译python的gcc版本,然后切换到那个版本的gcc(link that version to your /usr/bin directory)手动安装pycurl(run `python setup.py install` in the extracted source directory)。
Htom
2010-07-28 13:07:38 +08:00
@kaid 再次感谢!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/804

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX