V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Htom
V2EX  ›  Python

求助:雪豹下安装pycurl出错

  •  
  •   Htom · 2010-07-23 10:26:29 +08:00 · 7444 次点击
    这是一个创建于 5241 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我想尝试tornado, 但它需要pycurl支持, 悲剧的是在我的雪豹下死活搞不定, 最后都是import pycurl出错, 不知道谁有过成功安装的经验? 谢谢!
    18 条回复    1970-01-01 08:00:00 +08:00
    kaid
        1
    kaid  
       2010-07-23 11:52:47 +08:00
    请您附上错误信息
    Htom
        2
    Htom  
    OP
       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
        3
    Htom  
    OP
       2010-07-23 12:00:12 +08:00
    xcode 装了, 3.2.3版本
    kaid
        4
    kaid  
       2010-07-23 12:09:38 +08:00
    光盘里有10.4sdk的pkg,装上再试试吧
    Htom
        5
    Htom  
    OP
       2010-07-23 14:55:44 +08:00
    OK, 谢谢, 回家后去试试
    Livid
        6
    Livid  
    MOD
       2010-07-23 16:03:03 +08:00 via iPhone
    是用 MacPort 安装的吗?
    Htom
        7
    Htom  
    OP
       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
        8
    Htom  
    OP
       2010-07-23 20:50:34 +08:00
    补充一下, 10.4sdk的pkg已经安装?

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

    我一直都是用 MacPort 安装各种软件。
    kaid
        10
    kaid  
       2010-07-24 17:49:25 +08:00
    应该是libcurl和pycurl版本不兼容。尝试自己写个formula brew个7.19.0版的libcurl吧
    kaid
        11
    kaid  
       2010-07-24 18:15:14 +08:00
    如果再出什么问题的话跑一下test suite看卡哪里fail了吧。
    Htom
        12
    Htom  
    OP
       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
        13
    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
        14
    Livid  
    MOD
       2010-07-24 22:24:58 +08:00
    装一个 MacPorts 就所有问题都解决了。。。
    kaid
        15
    kaid  
       2010-07-25 11:04:37 +08:00
    @livid 折腾是无穷尽的;)
    Htom
        16
    Htom  
    OP
       2010-07-26 17:37:40 +08:00
    @kaid 握个手
    kaid
        17
    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
        18
    Htom  
    OP
       2010-07-28 13:07:38 +08:00
    @kaid 再次感谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3626 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:29 · PVG 12:29 · LAX 20:29 · JFK 23:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.