如何安装 pyCurl?
我使用 libcurl 没有任何问题,并且过去使用过 pyCurl 一次。 现在我想在我的机器和开发人员上设置它。 但是我不知道该怎么做。 我不想 DL libcirl 文件并将其与 pycurl 一起编译,我想知道最简单的方法。 我的机器上安装了 libcurl。
我在 Windows 上。 我尝试DLing源代码并使用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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
TL,DR
从以下网站获取二进制文件:http:// www.lfd.uci.edu/~gohlke/pythonlibs/
直接链接:
2.6 32位
,<代码>2.7 32位< /code>,
2.6 64位
,2.7 64bit
对于 pycURL,
pip
和easy_install
都会失败在 Windows 上。我还尝试手动下载并安装 pycURL 包,之后
下载 cURL,但这也不起作用,即使指定了
CURL_DIR
(它抱怨找不到 'lib\libcurl.lib' )。 从何而来我可以从 README 中了解到,它在
CURL_DIR
中需要的是源代码cURL 的分发,而不是可执行文件。
从官方下载预编译版本 pycURL
存储库可能会帮助你
无处可去,因为它需要 Python 2.5。 它不能与 2.6 一起工作。
目前唯一简单的方法似乎是
这个
非官方发布。 它是一个可执行安装程序,我在没有任何安装程序的情况下使用了它
Python 2.6 的问题。 Python 版本
2.7
可从同一网站获取。
您可能还想考虑使用
requests
,这是一种流行的pycURL 的替代品。 使用起来很愉快,并且正在积极开发。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
andeasy_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 'lib\libcurl.lib' ). From whatI can gather from the README, what it needs in the
CURL_DIR
is the sourcedistribution 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.您可以尝试从这里下载 pycurl
http://www.lfd.uci.edu/~ gohlke/pythonlibs/
或此处
You can try to download pycurl from here
http://www.lfd.uci.edu/~gohlke/pythonlibs/
or here
http://pycurl.sourceforge.net/download/
取决于平台。 在 ubuntu 上,它就像这样简单:
这是一个很常见的软件包,以至于大多数主要的 Linux 发行版都会在其源代码中包含它。
如果您使用的是 Windows,则还需要 cURL。 然后你可以安装 pycurl ,它包含在安装程序中。
Depends on platform. Here on ubuntu it's as simple as:
It's common enough a package to think that most major Linux distributions will have it in their sources.
If you're on windows, you'll need cURL too. Then you can install pycurl which comes wrapped in an installer.
根据 http://bazaar-vcs.org/PyCurl
这两个链接都有 Windows 安装程序,希望它们对您有用。
According to http://bazaar-vcs.org/PyCurl
There are windows installers at both links, hopefully they will work for you.
正如已经说过的,这取决于平台。
一般来说,我更喜欢只使用为我的操作系统打包的 Python 解释器本身,并将其他所有内容安装在 虚拟环境中环境,但这是一个完全不同的故事......
如果您安装了 setuptools,安装大多数 Python 包就像这样简单:
As it has been said already, it depends on the platform.
In general, I prefer to use only the Python interpreter itself that is packaged for my OS and install everything else in a virtual environment, but this is a whole different story...
If you've got setuptools installed, installing most Python packages is as simple as:
我的环境是Windows 7和Python 2.7。 虽然我的 Windows 7 是 64 位,但我的 Python 2.7 是 32 位。
我通过访问 http://pycurl.sourceforge.net/download/ 并下载并运行 pycurl 取得了成功-7.19.3.win32-py2.7.msi。
My environment is Windows 7 and Python 2.7. Although my Windows 7 is 64-bit, my Python 2.7 is 32-bit.
I had success by visiting http://pycurl.sourceforge.net/download/ and downloading and running pycurl-7.19.3.win32-py2.7.msi.
视窗:
蟒蛇3.7.1
从 https://dl.bintray.com/pycurl/ 下载
.msi
pycurl/ 并安装,它工作得很好。Windows:
python 3.7.1
Download
.msi
from https://dl.bintray.com/pycurl/pycurl/ and install, it works perfectly.