pycurl install :( already have min. libcurl version

不羁岁月 提交于 2019-12-05 21:43:35

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:

sudo port selfupdate
sudo port -u install py26-curl   #edited

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:

sudo port selfupdate
sudo port -u install curl

Then manually install pycurl using something like:

curl http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz | tar xz
cd pycurl-7.19.0
python2.6 setup.py install --curl-config=/opt/local/bin/curl-config

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!