Questions tagged [pycurl]

PycURL is a Python interface to libcurl.

PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features.

609 questions
5
votes
1 answer

When installing pycurl on Windows I get, "Please specify --curl-dir=/path/to/built/libcurl"

Trying to install the python library pycurl on my Windows machine. I already have pip set up so I'm using the command, "pip install pycurl". However I get this in the error logs - Please specify --curl-dir=/path/to/built/libcurl Complete…
Kat
  • 475
  • 1
  • 6
  • 21
5
votes
2 answers

Installing pycurl on mac

I am very new to python and need help installing the pycurl library on my machine. I am running python 2.7 at the moment. A brief tutorial would be much appreciated.
user3264845
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

sending base64-encoded image as form variable using curl

I'm writing a script that extracts images from email and uploads them to facebook. As a result, I'm getting image data encoded in base64, and I'd like to upload this data using curl without saving the image data to a file on disk. Here is the body…
Michael Altfield
  • 2,083
  • 23
  • 39
5
votes
1 answer

extract data from a dictionary returned by pycurl

I have this: import pycurl import pprint import json c = pycurl.Curl() c.setopt(c.URL, 'https://mydomainname.com') c.perform() the above code return a dictionary like this: {"name":"steve", "lastvisit":"10-02-2012", "age":12} I want to loop…
mongotop
  • 7,114
  • 14
  • 51
  • 76
4
votes
3 answers

HEAD request vs. GET request

I always had the idea that doing a HEAD request instead of a GET request was faster (no matter the size of the resource) and therefore had it advantages in certain solutions. However, while making a HEAD request in Python (to a 5+ MB dynamic…
Ben
  • 16,275
  • 9
  • 45
  • 63
4
votes
1 answer

Image Download with PycURL gets me broken Images

I'm struggling with pycurl. These are my headers: headers.append('User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0') headers.append('Accept:…
Hurix
  • 433
  • 3
  • 11
4
votes
2 answers

ImportError: The curl client requires the pycurl library Docker + Django

I'm dockerizing Django 2.2 application and using Pipenv for environment management. I want to use SQS as broker with Django celery. I have installed the pycurl library using Pipenv [packages] ... pycurl = "*" When I run celery locally pipenv run…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
4
votes
3 answers

Unable to install pycurl==7.43.0 on AWS Elastic Beanstalk

I'm working on Elastic Beanstalk on a Django application and I'm a bit naive when it comes to the devops side. I've having trouble installing pycurl, which I've been advised (with a different SO thread How to run a celery worker with Django app…
goose
  • 2,502
  • 6
  • 42
  • 69
4
votes
2 answers

Multi-request pycurl running forever ( Infinite loop)

I want to perform Multi-request using Pycurl. Code is: m.add_handle(handle) requests.append((handle, response)) # Perform multi-request. SELECT_TIMEOUT = 1.0 num_handles = len(requests) while num_handles: ret =…
Nisarg
  • 121
  • 3
  • 5
4
votes
0 answers

How to pass environment variables to Tox before installing deps?

I need 3 env variables in order to install pycurl. When i use Tox, i can't pass my env variables to the Tox environment before it runs the deps installation command. I already tried using setenv and passenv, but both passes the env variables to the…
FirEc00l
  • 41
  • 4
4
votes
1 answer

Python issue with pycurl and openssl

I am trying to run code that uses pycurl but when I do i get the following error: uilleann-pipes-160:data_collection Jim$ python xlsxDownloader.py Traceback (most recent call last): File "xlsxDownloader.py", line 21, in from…
Jim Hines
  • 53
  • 1
  • 5
4
votes
2 answers

How to fix? ImportError: pycurl: libcurl link-time version is older than compile-time version

I have this error when I run tests on a conda environment which I built from specs in environment.yml File "utils.py", line 5, in import pycurl ImportError: pycurl: libcurl link-time version (7.29.0) is older than compile-time version…
James Adams
  • 8,448
  • 21
  • 89
  • 148
4
votes
1 answer

easy_install - pyCurl install issue

I am trying to install pyCurl using easy_install, but I get the following error In file included from src/docstrings.c:4: src/pycurl.h:170:13: fatal error: 'openssl/crypto.h' file not found include 1 error generated. error: Setup…
mykhailo
  • 117
  • 2
  • 14
4
votes
2 answers

How can I make a pycurl http2 request?

I am trying to make a http2 request through pycurl. I have installed the nghttp2 c library that libcurl needs and I am able to do an http2 request with curl. I tried something like this with pycurl: import pycurl import cStringIO if __name__ ==…
Donovan
  • 816
  • 1
  • 10
  • 16
4
votes
2 answers

Unable to close a stream opened with pycurl

I am working on a client for a web service using pycurl. The client opens a connection to a stream service and spawns it into a separate thread. Here's a stripped down version of how the connection is set up: def _setup_connection(self): …
boldfield
  • 95
  • 2
  • 5