pycurl install :( 已经有最低的 libcurl 版本
我在 Intel Mac OS X 10.5 上运行 python 2.6
我正在尝试安装 pycurl 7.16.2.1 (如此处推荐的 http://curl.haxx.se/mail/curlpython-2009-03/0009.html),但由于某种原因,安装看到我的 libcurl 7.16。 3,但它仍然坚持我安装 7.16.2 或更高版本(7.16.3 不满足这个要求吗?)
这是错误输出:
Running pycurl-7.16.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3emZIB/pycurl-7.16.2.1/egg-dist-tmp-K10rbP
Using curl-config (libcurl 7.16.3)
src/pycurl.c:54:4:src/pycurl.c:54:4: error: #error "Need libcurl version 7.16.2 or greater to compile pycurl."
error: #error "Need libcurl version 7.16.2 or greater to compile pycurl."
确定curl-config --version 产生 libcurl 7.16.3
有什么建议吗?我应该升级 libcurl 还是坚持使用出厂默认库?
==在响应后添加了更多详细信息==
AFAIK我拥有的python是出厂默认值(我自己没有从python.org获得它)
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
这是我的curl版本。看起来有误导性,因为我使用的是 Intel Macbook,而不是 PPC。
curl 7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IPv6 Largefile NTLM SSL libz
我将采用与我现有的 python 解释器兼容的 pycurl,
我有端口:
sudo port -u install py26-pycurl
Error: Port py26-pycurl not found
I'm running python 2.6 on an Intel Mac OS X 10.5
I'm trying to install pycurl 7.16.2.1 (as recommended here http://curl.haxx.se/mail/curlpython-2009-03/0009.html), but for some reason, the installation sees my libcurl 7.16.3, yet it still insist I install 7.16.2 or greater (doesn't 7.16.3 satisfy that?)
Here's the error output:
Running pycurl-7.16.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3emZIB/pycurl-7.16.2.1/egg-dist-tmp-K10rbP
Using curl-config (libcurl 7.16.3)
src/pycurl.c:54:4:src/pycurl.c:54:4: error: #error "Need libcurl version 7.16.2 or greater to compile pycurl."
error: #error "Need libcurl version 7.16.2 or greater to compile pycurl."
To be certain curl-config --version yields libcurl 7.16.3
Any advice? Should I upgrade libcurl, or stick with the factory default lib?
== added more details after response ==
AFAIK the python I have is factory default (I didn't get it myself from python.org)
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
And this is my curl version. Looks misleading because I'm using an Intel Macbook, not PPC.
curl 7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IPv6 Largefile NTLM SSL libz
I'll take whichever pycurl works with my existing python interpreter
I do have ports:
sudo port -u install py26-pycurl
Error: Port py26-pycurl not found
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是 python.org Python 2.6,则它是使用 10.4 SDK 构建的,以便能够在多个版本的 OS X 上运行。在这种情况下,pycurl 构建可能会尝试链接到 10.4 版本的 libcurl ,似乎是 7.13.1。您链接到的线程正在谈论使用 10.5 Apple 提供的 Python 2.5,它是使用 10.5 库构建的,因此 pycurl 7.16.2.1 似乎可以正确构建和安装。
您可以尝试手动安装pycurl; setup.py 有一个已记录的 --curl-config 参数,它允许您指定要使用的 curl-config 的路径。不幸的是,这似乎不适用于 /usr/bin/curl-config;未添加正确的包含文件目录。除了破解 setup.py 文件之外,更好的方法是安装更新的 libcurl 并使用最新的 pycurl。最简单的方法是使用 MacPorts。更简单的是从 MacPorts 安装 pycurl 和 python2.6。如果您尚未使用 MacPorts,请下载并安装基本文件。然后:
MacPorts python2.6 将位于
/opt/local/bin/python2.6
。如果您宁愿坚持使用已安装的 python2.6,请安装curl 包:
然后使用以下命令手动安装pycurl:
If you are using the python.org Python 2.6, it is built using the 10.4 SDK so as to be able to run on multiple versions of OS X. In that case, the pycurl build is likely trying to link against the 10.4 version of libcurl, which appears to be 7.13.1. The thread you link to is talking about using the 10.5 Apple-supplied Python 2.5 which is built using 10.5 libraries and, with that, pycurl 7.16.2.1 does seem to build and install correctly.
You can try to manually install pycurl; there is a documented --curl-config argument to its setup.py which allows you to specify the path to the curl-config to use. Unfortunately, that does not seem to work with /usr/bin/curl-config; the proper include files directories are not being added. Short of hacking the setup.py file, a better approach is to install a newer libcurl and use the latest pycurl. The easiest way to do that is to use MacPorts. Even easier is to install pycurl and python2.6 from MacPorts. If you don't already use MacPorts, download and install the base files. Then:
The MacPorts python2.6 will be at
/opt/local/bin/python2.6
.If you'd rather stick with the python2.6 you've installed, install the curl package:
Then manually install pycurl using something like:
我从 Sourceforge 得到了 pycurl。似乎他们有可前后安装的版本,可以与任何“附带”的 Mac OS X 配置相匹配。我相信 URL 是 http://pycurl.sourceforge.net 但不要引用我的观点。
BZT
I got my pycurl from Sourceforge. Seems they'd have installable builds backwards and forwards that would match any "shipped with" Mac OS X configuration there is. I believe the URL is http://pycurl.sourceforge.net but don't quote me on that.
BZT