27

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.

peterh
  • 11,875
  • 18
  • 85
  • 108
  • 1
    @Chitimalli not only is 'feb 3 09' 6yr ago, your link is to this very post –  Jun 09 '15 at 21:31

8 Answers8

19

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 '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.

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.

Mihai Rotaru
  • 1,953
  • 3
  • 26
  • 28
  • I long ago considered moving off Windows, but now that desire is stronger than ever – chester89 Aug 24 '14 at 10:46
  • 1
    This is poor package maintenance on the pycURL side, nothing to do with Windows. – EKW Jun 01 '15 at 21:02
  • I love requests usability as well, however, could be that the motive behind picking pycurl has to do with performance https://stackoverflow.com/a/32899936/2128265 – Marc Aug 09 '18 at 22:46
  • The binaries don't exist anymore :( – vpp Nov 28 '22 at 20:03
15

You can try to download pycurl from here

http://www.lfd.uci.edu/~gohlke/pythonlibs/

PycURL is a interface to the libcurl library.
pycurl-7.19.0.win-amd64-py2.6.‌exe [863 KB] [Python 2.6] [64 bit] [Dec 09, 2010]
pycurl-7.19.0.win-amd64-py2.7.‌exe [863 KB] [Python 2.7] [64 bit] [Dec 09, 2010]
pycurl-7.19.0.win32-py2.6.‌exe [764 KB] [Python 2.6] [32 bit] [Dec 09, 2010]
pycurl-7.19.0.win32-py2.7.‌exe [764 KB] [Python 2.7] [32 bit] [Dec 09, 2010]

or here

http://pycurl.sourceforge.net/download/

pycurl-ssl-7.15.5.1.win32-py2.4.exe 02-Oct-2006 10:10 534K precompiled win32 installer (with openssl-0.9.8c, zlib-1.2.3, c-ares-1.3.1)
pycurl-ssl-7.15.5.1.win32-py2.5.exe 02-Oct-2006 10:10 534K precompiled win32 installer (with openssl-0.9.8c, zlib-1.2.3, c-ares-1.3.1)
pycurl-ssl-7.16.4.win32-py2.4.exe 05-Sep-2007 19:28 546K precompiled win32 installer (with openssl-0.9.8e, zlib-1.2.3, c-ares-1.4.0)
pycurl-ssl-7.16.4.win32-py2.5.exe 05-Sep-2007 19:27 546K precompiled win32 installer (with openssl-0.9.8e, zlib-1.2.3, c-ares-1.4.0)
pycurl-ssl-7.18.2.win32-py2.5.exe 17-Jun-2008 20:43 540K precompiled win32 installer (with openssl-0.9.8h, zlib-1.2.3)

Alex L
  • 8,748
  • 5
  • 49
  • 75
Marco Rossi
  • 736
  • 7
  • 7
  • 1
    Avira is giving me an error why I try going to the first link, just thought I'd put that here. – Amir Mar 19 '12 at 17:00
13

Depends on platform. Here on ubuntu it's as simple as:

sudo apt-get install python-pycurl

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.

Siddharth Das
  • 1,057
  • 1
  • 15
  • 33
JosefAssad
  • 4,018
  • 28
  • 37
  • If you've already done this, but pip blows up when it also tries to install it (e.g. for pyresttest), try installing libcurl4-openssl-dev as well. – Michael Scheper Jul 14 '17 at 21:38
12

According to http://bazaar-vcs.org/PyCurl

Since Windows does not come with neither cURL or pycURL, Windows users will have to install both.

cURL downloads: http://curl.haxx.se/download.html.

pycURL downloads: http://pycurl.sourceforge.net/download/.

Both links contain Linux (and other *Nix) tarballs/packages and Windows installer files.

There are windows installers at both links, hopefully they will work for you.

Ryan
  • 1,306
  • 1
  • 13
  • 20
7

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:

easy_install pycurl
paprika
  • 2,424
  • 26
  • 46
  • This is not very descriptive... In case you had trouble installing setuptools, check out my answer again, I edited the link to point to pypi (Python Package Index), that page also has instructions for installing setuptools on Windows. Good luck! – paprika Feb 03 '09 at 21:57
  • That is what I get after installing curl in Windows, when I try to easy_install pycurl : AssertionError: please check CURL_DIR in setup.py – Guido Mar 22 '10 at 11:10
  • I finally download it and manually installed it instead of using easy_install. – Guido Mar 22 '10 at 11:29
  • Worked for me on a Windows 7 box. I installed cURL first, and then easy_install handled the pycURL install with no issues. – DCaugs Jan 29 '16 at 18:15
2
sudo apt install libcurl4-openssl-dev libssl-dev
pip install pycurl
Alperen Sözer
  • 371
  • 3
  • 7
1

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.

Steve Saporta
  • 4,581
  • 3
  • 30
  • 32
0

Windows: python 3.7.1 Download .msi from https://dl.bintray.com/pycurl/pycurl/ and install, it works perfectly.

drt
  • 735
  • 6
  • 16