Can't install pycurl with pip
Asked Answered
O

9

21

Can't install pycurl with pip, win xp x32, python 2.7.

here is the log

pip install pycurl
Downloading/unpacking pycurl
  Downloading pycurl-7.19.3.1.tar.gz (116Kb): 116Kb downloaded
  Running setup.py egg_info for package pycurl
    Please specify --curl-dir=/path/to/built/libcurl
    Complete output from command python setup.py egg_info:
    Please specify --curl-dir=/path/to/built/libcurl

----------------------------------------
Command python setup.py egg_info failed with error code 10 in C:\Documents and S
ettings\User\build\pycurl
Storing complete log in C:\Documents and Settings\User\Application Data\pip\pi
p.log
Operation answered 31/3, 2014 at 6:8 Comment(4)
Did you specify the --curl-dir ? Like the log said "Please specify --curl-dir=/path/to/built/libcurl"Penthouse
Since you are on Windows, you have to install cURL before pycurl: https://mcmap.net/q/496950/-how-can-i-install-pycurlBroeder
lfd.uci.edu/~gohlke/pythonlibsCormier
This question has an answer hereTamper
T
28

Following the steps one mentioned above, solved my problem.

sudo apt install libcurl4-gnutls-dev librtmp-dev

pip install pycurl
Teller answered 20/11, 2019 at 17:4 Comment(0)
A
9

This is a problem indeed. No need to update pip or easy install as it's often advised, well it won't hurt to update but you will still have the problem until you :

  1. install libcurl4-gnutls-dev librtmp-dev packages
  2. pip install pycurl

Worked the same in Linux

Attendance answered 13/12, 2017 at 11:2 Comment(1)
On CentOS, I get the error, "No package libcurl4-gnutls-dev available" and "No package librtmp-dev available."Scleroprotein
P
5

Here are easy steps I did to get around this:

  1. Download the wheel of the version you want here: https://www.lfd.uci.edu/~gohlke/pythonlibs/

  2. then you can pip install that like so:

    pip install C:\sample\sample_dir\whl_file_downloaded

You should know be able to import in your python files

Peddada answered 11/1, 2019 at 12:55 Comment(1)
Real solution! Thanks!!!Resplendent
A
4

I had the same problem. I was able to install it with easy_install instead:

easy_install pycurl

For easy_install, see setuptools.

Aery answered 15/11, 2015 at 10:14 Comment(1)
with easy_install, I still get the C:\Lib\site-packages errorEmitter
J
4

install pycurl using conda, conda will install all dependencies, Hope it works

conda install -c anaconda pycurl

Jeavons answered 16/3, 2019 at 14:7 Comment(0)
A
1

steps to follow :

  1. brew install openssl

  2. PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl

Axillary answered 16/3, 2019 at 13:47 Comment(1)
I did a slight variation: PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" pip3 install --no-cache-dir pycurlMize
D
0

For Linux Please install the libcurl-devel package and then try. It will work.

Defaulter answered 18/11, 2022 at 14:5 Comment(0)
V
0

This is an old thread, and previous solutions did not work form me. And I had to change the path for openssl I am commenting it here, I believe it might save someone's time. Machine I am using

MacOS: Apple M1 Pro (Ventura v13.4)

pip uninstall pycurl
PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/opt/homebrew/opt/openssl/lib" CPPFLAGS="-I/opt/homebrew/opt/openssl/include" pip install --no-cache-dir pycurl
Vocoid answered 28/7, 2023 at 13:48 Comment(0)
P
-3

So has said by Hai Vu you need to install cURL first. Here is the dowload page : http://curl.haxx.se/download.html I suggest you install it in your C:/ directory, or if you already installed it elsewhere copye the curl.exe file to your c:/

When done, you can try it by going to the cmd prompt :

cd c:/
curl "your-curl-request"

If it works then curl is correctly installed and you can install pycurl with pip.

Pyxidium answered 13/7, 2015 at 13:15 Comment(1)
Downvoting because this 1) doesn't work 2) putting executables in the system drive root is terrible advice.Kiesha

© 2022 - 2024 — McMap. All rights reserved.