Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
647 views
in Technique[技术] by (71.8m points)

python - How can I install pyCurl?

I used libcurl with no problems and used pyCurl once in the past. Now i want to set it up on my machine and dev. However i have no idea how to do it. I rather not DL libcirl files and compile that along with pycurl, i want to know the simplest method. I have libcurl installed on my machine.

I am on Windows. I tried DLing the sources and use pycurl setup script, but I had no luck.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

TL,DR

Get a binary from this website: http://www.lfd.uci.edu/~gohlke/pythonlibs/

Direct links: 2.6 32bit, 2.7 32bit,2.6 64bit, 2.7 64bit


For pycURL, both pip and easy_install will fail on Windows.

I also tried to download and install the pycURL package manually, after downloading cURL, but that didn't work either, even if specifying the CURL_DIR ( it complained that it cannot find 'liblibcurl.lib' ). From what I can gather from the README, what it needs in the CURL_DIR is the source distribution of cURL, not the executable.

Downloading the precompiled version from the official pycURL repository will probably get you nowhere, because it requires Python 2.5. It will not work with 2.6.

The only easy way at the moment seems to be this unofficial release. It an executable installer, and I have used it without any issues with Python 2.6. A version for Python 2.7 is available from the same site.


You might also want to consider using requests, a popular alternative to pycURL. It's a pleasure to use, and is actively developed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...