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

查看:40
本文介绍了如何安装 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, 2.7 64bit

对于 pycURL,pipeasy_install 在 Windows 上都会失败.

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

我也试过手动下载安装pycURL包,之后下载 cURL,但这也不起作用,即使指定了CURL_DIR (它抱怨找不到 'liblibcurl.lib' ).从何而来我可以从 README 中收集,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 '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.

从官方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.

您可能还想考虑使用 requests, 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天全站免登陆