如何安装pyCurl? [英] How can I install pyCurl?

查看:88
本文介绍了如何安装pyCurl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有问题地使用过libcurl,过去也曾经使用过pyCurl.现在,我想在我的机器和开发人员上进行设置.但是我不知道该怎么做.我宁愿不了解DL libcirl文件,也不要将其与pycurl一起编译,我想知道最简单的方法.我的机器上安装了libcurl.

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.

我在Windows上.我尝试DLing源代码并使用pycurl设置脚本,但是我没有运气.

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

推荐答案

TL,DR

从以下网站获取二进制文件: http://www.lfd.uci.edu/〜gohlke/pythonlibs/

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

直接链接: 2.6 32bit 2.7 32bit 2.6 64bit

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

对于pycURL, pip easy_install 在Windows上都将失败.

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

我还尝试在下载后手动下载并安装pycURL软件包下载cURL,但是即使指定了 CURL_DIR (它抱怨找不到'lib \ libcurl.lib').从何而来我可以从自述文件中收集,在 CURL_DIR 中需要的是源文件分配cURL,而不是可执行文件.

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 'lib\libcurl.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.

从官方 pycURL下载官方版本存储库可能会帮助您无处,因为它需要Python 2.5.在2.6中将工作.

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.

目前唯一简单的方法似乎是非官方发布.它是一个可执行的安装程序,我没有任何使用它Python 2.6的问题.适用于Python的版本2.7 可从同一网站中获得.

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.

您可能还想考虑使用 请求 ,是pycURL的一种流行替代方法.这是一种使用上的乐趣,并且是积极开发的.

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

这篇关于如何安装pyCurl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆