V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Jul 23, 2010 · 8391 views
    This topic created in 5765 days ago, the information mentioned may be changed or developed.
    我想尝试tornado, 但它需要pycurl支持, 悲剧的是在我的雪豹下死活搞不定, 最后都是import pycurl出错, 不知道谁有过成功安装的经验? 谢谢!
    18 replies    1970-01-01 08:00:00 +08:00
    kaid
        1
    kaid  
       Jul 23, 2010
    请您附上错误信息
    Htom
        2
    Htom  
    OP
       Jul 23, 2010
    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
       Jul 23, 2010
    xcode 装了, 3.2.3版本
    kaid
        4
    kaid  
       Jul 23, 2010
    光盘里有10.4sdk的pkg,装上再试试吧
    Htom
        5
    Htom  
    OP
       Jul 23, 2010
    OK, 谢谢, 回家后去试试
    Livid
        6
    Livid  
    MOD
    PRO
       Jul 23, 2010 via iPhone
    是用 MacPort 安装的吗?
    Htom
        7
    Htom  
    OP
       Jul 23, 2010
    @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
       Jul 23, 2010
    补充一下, 10.4sdk的pkg已经安装?

    @livid 你是在macport下安装的吗?
    Livid
        9
    Livid  
    MOD
    PRO
       Jul 23, 2010
    MacPort 很好用,问题也少。

    我一直都是用 MacPort 安装各种软件。
    kaid
        10
    kaid  
       Jul 24, 2010
    应该是libcurl和pycurl版本不兼容。尝试自己写个formula brew个7.19.0版的libcurl吧
    kaid
        11
    kaid  
       Jul 24, 2010
    如果再出什么问题的话跑一下test suite看卡哪里fail了吧。
    Htom
        12
    Htom  
    OP
       Jul 24, 2010
    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  
       Jul 24, 2010
    ach, gerade zu hause angekommen..........ein klein bisschen betrunken. deine libcurl verison ist noch 7.19.7......
    Livid
        14
    Livid  
    MOD
    PRO
       Jul 24, 2010
    装一个 MacPorts 就所有问题都解决了。。。
    kaid
        15
    kaid  
       Jul 25, 2010
    @livid 折腾是无穷尽的;)
    Htom
        16
    Htom  
    OP
       Jul 26, 2010
    @kaid 握个手
    kaid
        17
    kaid  
       Jul 26, 2010
    @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
       Jul 28, 2010
    @kaid 再次感谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3449 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 00:09 · PVG 08:09 · LAX 17:09 · JFK 20:09
    ♥ Do have faith in what you're doing.