Questions tagged [pycurl]

PycURL is a Python interface to libcurl.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

PycURL - Looping the status of API Call

this is my first question in this forum. And I'm really beginner with Python nad PycURL module. Below code is courtesy of this group. But i think i missing something. import pycurl import io import ...
preetam vmw's user avatar
0 votes
0 answers
76 views

How to install pycurl on Mac?

I am as new as it get's to programming. I am trying to access the ChatGPT API to write a bachelor thesis. I am on Mac 12.5.1, using Python 3.8.12 (trying at least). I need to execute a curl command in ...
chinsch's user avatar
0 votes
0 answers
16 views

why pycurl.curl.perform( ) reports an error 'Could not resolve host'?

I import pycurl 7.45.2 successfully and run 'curl.setopt(pycurl.URL, "http://www.python.org/") 3 dup = curl.duphandle() ----> 4 curl.perform( )', but an error reports that error: 6 '...
NiuJun's user avatar
  • 1
0 votes
0 answers
12 views

About whether pycurl supports loading openssl engine

Hello guys: I would like to ask if python2 can load openssl engine via pycurl? If it supports please how to load it? I see that there is an SSLENGINE option in pycurl, but by specifying the correct ...
jwei teng's user avatar
0 votes
0 answers
219 views

Installation error with pycURL on Python 3.10.6 (Ubuntu 22.04.2)

After running pip install libcurl, I keep getting the following output: Defaulting to user installation because normal site-packages is not writeable Collecting pycurl Using cached pycurl-7.45.2.tar....
liam's user avatar
  • 1,918
0 votes
0 answers
38 views

Windows 11 with Phyton v3.10.x. ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include compile-time ssl backend (openssl)

I am a windows 11 user with Python V3.10.9 I want to run pyload (python packages), but there is always an error ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include compile-...
Jawa Betawi's user avatar
0 votes
2 answers
232 views

How to install pycurl on Apple M1 Silicon using pip v23.1+

Installing pycurl on computers with Apple M1 chips has always been a struggle. I have been using this command to install pycurl with OpenSSLv3 using pip: brew update && brew install openssl ...
jdesilvio's user avatar
  • 1,794
1 vote
1 answer
66 views

Send multiform post request of file using pycurl

I am trying to hit Curl request with Python using pycurl.Need to send the file using post and file should be multiform data. I can't use requests module due to some limitation, but Curl is throwing ...
Anmol Kumar's user avatar
1 vote
1 answer
205 views

Building airflow in docker compose with pycurl in requirements gets Permission denied: 'curl-config'

The problem When building a docker image for apache airflow, build fails at RUN pip install -r requirements.txt (when installing pycurl package) with: Permission denied: 'curl-config' What I think ...
Sanchez333's user avatar
0 votes
0 answers
13 views

Error trying to install pycurl in Visual Studio [duplicate]

I'm very new to Python. I'm using a tool that needs pycurl but when I try to install it using: pip install pycurl I keep getting the following error: C:\Users\mdebe> pip install pycurl Collecting ...
Michael DeBellis's user avatar
0 votes
0 answers
171 views

Why does time_starttransfer is higher than the total_time?

The times measured by Curl look confusing - I am always seeing that APPCONNECT_TIME is higher than even TOTAL_TIME. I also expect APPCONNECT_TIME being less than STARTRANSFER_TIME because the latter ...
Agenobarb's user avatar
  • 143
0 votes
2 answers
131 views

EC2 .bashrc and .bash_profile re-setting

Reason I'm asking: pycurl requires both libcurl-devel and openssl-devel. To install these, I have these two lines the my .bash_profile: sudo yum install libcurl-devel sudo yum install -y openssl-devel ...
Daniel Johnson's user avatar
2 votes
0 answers
76 views

I get no response when using curl_httpclient in Tornado, the app hangs pending, what am I missing?

os: Debian 11 - minimal install, (SSH Server and Standard system utilities) curl -V curl 7.74.0 (x86_64-pc-linux-gnu) libcurl/7.74.0 OpenSSL/1.1.1n zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 ...
Keo's user avatar
  • 21
0 votes
0 answers
52 views

Is it possible the use a dict as header in PyCurl?

I'm writing a trading bot for KuCoin in python, but I have trouble authenticating myself with the API. It is working fine when I use the requests library, but I want to use PyCurl instead, problem is ...
elapidae's user avatar
0 votes
0 answers
51 views

Why my program to scrape NSE website using CURL in a Python program is not giving proper JSON output?

import subprocess import os os.chdir(os.path.dirname(os.path.abspath(__file__))) subprocess.Popen('curl "https://www.nseindia.com/api/option-chain-currency?symbol=USDINR" -H "...
Paras Awasthi's user avatar
0 votes
0 answers
94 views

API Facebook graph API15 - get multiple pages access token and to grant them with curl

My problem I coded in Python a routine to retrieve all the statistics of Facebook pages and posts of my employer. Authorisations: read_insights pages_show_list pages_read_engagement ...
Alain Tiri's user avatar
0 votes
0 answers
61 views

CURLOPT_REQUEST_TARGET with pycurl

I would like to use pycurl with the option that matches --request-target on the command line tool. When trying this with the following code: import pycurl c = pycurl.Curl() c.setopt(c.URL, "http:/...
Marcel's user avatar
  • 1
0 votes
1 answer
130 views

libcurl link-time version (7.76.1) is older than compile-time version (7.86.0)

Whenever I start celery worker in my django project, it fails to start with the following error: "Unrecoverable error: ImportError('The curl client requires the pycurl library.') I have visited ...
SyntaxError's user avatar
2 votes
1 answer
3k views

No module named 'distutils.command.bdist_msi'

In Pycharm (Windows 11) I set up a basic project consisting of one line: import pycurl The environment is Virtualenv, the base intepreter path is C:\Users\strat\AppData\Local\Programs\Python311\...
Life after Guest's user avatar
0 votes
0 answers
173 views

Pycurl is not successfully verifying a wildcard certificate

I'm encountering an error in a Python application at a point where it's using pycurl to connect via HTTPS to a server. (Note, in this case, the "server" is another Python utility which ...
JDM's user avatar
  • 1,710
0 votes
0 answers
617 views

Can't pip pycurl (python 3.10.7) [duplicate]

PS C:\Users\7340861\Desktop\Vscode\iFA Website> pip install pycurl Collecting pycurl Using cached pycurl-7.45.1.tar.gz (233 kB) Preparing metadata (setup.py) ... error error: subprocess-...
Haru Ko-izumi's user avatar
1 vote
1 answer
339 views

Error with pycurl when sending a GET request (1010)

I would like to use pycurl to send requests to the FTX Exchange. I have tried with import pycurl import certifi from io import BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'https://...
apt45's user avatar
  • 412
0 votes
1 answer
109 views

how to pass --no-buffer option in pycurl

I want to disable the buffering of the output stream. curl has the option --no-buffer to disable that buffering. I am searching for this option in pyCurl but did not find any in documentation. Could ...
Chetana's user avatar
0 votes
0 answers
41 views

Python: Download only the HEAD tag of web page

I need to scrape multiple webpages (1000s per hour) as fast as possible, I only need to get the metadata from the head section. I don't think using range headers is going to be reliable as the head ...
Brendan Scullion's user avatar
7 votes
2 answers
3k views

Error 'openssl/crypto.h' file not found when installing PycURL on Mac using pip

When installing Python3 packages on macOS X 10.15 Catalina using pip install -r requirements.txt I am getting this error: × Running setup.py install for pycurl did not run successfully. │ exit code: ...
Tony's user avatar
  • 7,827
0 votes
1 answer
455 views

Checking proxies with python

I want to check if a proxy is alived or not using python. To do that, my approach was to use request like: import requests proxies = [] for i in proxies: prox = {"prox": f"http://{...
Learning from masters's user avatar
0 votes
0 answers
63 views

How to convert a command of curl to pycurl

There will be some log when I use pycurl. But I can use "curl -s" to let the log not show if I use curl. How should I do to discard the log if I use pycurl? The original curl command is just ...
AllenAlex's user avatar
1 vote
0 answers
96 views

PycURL: POST with correctly bytestring encoded filepath crashes with (error 26, '')

I have a problem with PycURL Version 7.45.1 with python 3.10.4 on Windows 10. I want to post a file from my computer onto an API. When I run my code (probably) the filepath makes problems because I ...
Felix Rösch's user avatar
0 votes
1 answer
90 views

curl to python scripting issue

i'm trying to convert my curl to a python code, unfortunately without any success. can anyone help me with this one, please? curl -k -X "POST" "https://192.168.16.220:9000/api/views/...
Marius's user avatar
  • 33
0 votes
1 answer
111 views

What should I use with proxies? Sockets, http.client, pycurl, or anything else?

Okay so basically, I'm writing a piece of code that heavily depends on speed, headers = { 'Authorization': 'Bearer '+jtw, } conn = http.client.HTTPSConnection("api....
Max Merwijk's user avatar
0 votes
1 answer
599 views

How to add Pycurl headers

I can't understand this works How to add multiple headers to pycurl HTTPS request, I tried to do it but it accepts the user agent only and gives me an error if I tried to add more headers url = "...
Hossam Al-din Hassan's user avatar
0 votes
0 answers
158 views

Replacing Python Requests with Pycurl

Iam interested to modify a python module (Discum), replace python requests with pycurl and see if this will brung even a minor improvement in performance. Unfortunately my Pycurl knowledge is limited. ...
k0s X.'s user avatar
  • 1
0 votes
1 answer
223 views

pylance report GeneralTypeIssues on members while typing pycurl example

I am a python beginner learning pycurl with its example on VSCode. import pycurl from io import BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.INTERFACE, 'lo') c.setopt(c.URL, "http://...
Andy Allan's user avatar
1 vote
0 answers
86 views

How to fix the 'link-time ssl backends' error? Windows 10, python3.9.7(or python10)

I started hosting my script on VDS, but I faced an error: when I installing pycurl on windows 10, it gives an error 'ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include ...
itist's user avatar
  • 11
1 vote
1 answer
589 views

Program consumed memory keeps growing while using PyCurl in multi threaded environment

Python program consumed memory grows over time when PyCurl is used in multi-threaded environment for concurrent HTTP API calls. Attached Python code snippet demonstrates the problem. Program simply ...
Muhammad Mohsin Khan's user avatar
0 votes
1 answer
1k views

Python equivalent of CURL with username and api token

I want to write the following curl command into python code. Following is the command for requesting some data from the URL. <user_name> : replace with the username <api_token> : replace ...
Milind Prajapat's user avatar
2 votes
0 answers
547 views

ImportError on `import pycurl` (Python 3.10, macOS)

Working from https://gist.github.com/vidakDK/de86d751751b355ed3b26d69ecdbdb99 I execute these commands: brew install openssl brew install curl # this is the latest version with openssl . .venv/bin/...
P i's user avatar
  • 29.2k
1 vote
2 answers
2k views

How to fix "#error architecture not supported" when installing pycurl with Python 3.8.2 on macOS 10.15?

I am trying to install pycurl 7.44.1 and it fails with a #error architecture not supported message. Here is what I have: Python 3.8.2 libcurl 7.64.1 macOS 10.15.7 (Catalina) (venv) TestBox:...
Zak44's user avatar
  • 341
0 votes
1 answer
3k views

Python convert curl command to urllib.request

I would like to convert my curl to urllib.request command to python, the curl command: curl -v -i -X POST http://api.textart.io/img2txt.json --form image=@path/to/dir/file.jpg my code: import json ...
user avatar
-1 votes
1 answer
1k views

unable to install pycurl on windows for Py 3.7 [duplicate]

In my requirments file there is pycurl==7.43.0.6. I am using Python 3.7. I get the following error: ERROR: Command errored out with exit status 10: command: 'c:\python\python.exe' -c 'import ...
Blue Clouds's user avatar
  • 7,365
0 votes
2 answers
147 views

Translating Bash cURL commands to Python

I have the below working in Bash. How would this be written in Python using requests or pycurl? curl -o .output_data.xml -v --cert ../cert/my_cert.pem:password123 -k 'https://my.target.url' -H '...
DelTheDub's user avatar
1 vote
1 answer
396 views

libcurl link-time ssl backends (schannel) do not include

ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include compile-time ssl backend (openssl) i use win10 + py3.9 + pycurl-7.44.1-cp39-cp39-win_amd64.whl + i can't use import ,...
freecoder's user avatar
0 votes
1 answer
615 views

How to identify tcp connection used by Curl?

My goal is to find out whether or not subsequent curl request used the same tcp connection as the initial one. I use pycurl and curl_easy_getinfo. I can see there is a LASTSOCKET in curl_easy_getinfo ...
Agenobarb's user avatar
  • 143
0 votes
0 answers
100 views

python script to verify the entries in curl output

Im new to python and looking for suggestions on how to achieve the below output. currently i just have a script to fetch the curl reponse. Looking for suggestions to move forward please. The curl ...
sre_engineer's user avatar
2 votes
1 answer
184 views

curl -i -H "Content-Type : Application/json" -X POST http://127.0.0.1:5000/courses

I try to update the data of json file and use the command curl -i -H "Content-Type : Application/json" -X POST http://127.0.0.1:5000/courses but I got an error something like - Invoke-...
Annu's user avatar
  • 21
1 vote
1 answer
292 views

pycurl and curl behaving differently when requesting same resource; curl correctly gives a JSON object, PycURL a HTML object

ipinfo.io provides information about the website/server corresponding to an IP address, either by entering it on their website or by sending a request to them via the curl command line utility, e.g: $ ...
Billy Smith's user avatar
3 votes
1 answer
799 views

How to install a package with Poetry that requires CLI args?

Here's an example that requires it: poetry add pycurl ... gives: ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) The fix is given ...
P i's user avatar
  • 29.2k
0 votes
1 answer
336 views

How to convert specific CURL request to Python

I have the following Curl request: curl -v --location --request POST 'http://127.0.0.1:8080/abc' \--header 'Content-Type: application/json' \--data-raw '{data}' I tried using pycurl and requests ...
Ashwini  kumar jha's user avatar
0 votes
0 answers
26 views

Using Python requests to unshorten urls - slow (compared to pycurl) [duplicate]

This is about unshortening url shorteners to reveal the end url. I've been using pycurl, and looking up (for example) ~80 urls takes ~24s in real time. Using the simple requests code below, looking up ...
redacted code's user avatar
0 votes
2 answers
362 views

benchmark HTTP1.1/HTTP2 in python

I did some benchmark on http1.1/http2 with python, the code is as simple as repeating a Google search request many times. The result is interesting: the http2 version is slower considerably. (i tried ...
4bo's user avatar
  • 1

1
2 3 4 5
13