Содержание
- Can’t install pycurl on Python 3.9, window 10, Pycharm but with Python 3.6 . #710
- Comments
- What did you try to do?
- What happened?
- What did you expect to happen?
- What is the PycURL version?
- What is your Python version?
- What is your operating system and its version?
- Other versions
- Is this the most recent PycURL release?
- Install pycurl on windows #657
- Comments
- What happened?
- What is the PycURL version?
- What is your Python version?
- What is your operating system and its version?
- PycURL Installation¶
- Distutils¶
- easy_install / pip¶
- pip and cached pycurl package¶
- Windows¶
- Building From Source¶
- winbuild.py¶
- Using PycURL With Custom Python Builds¶
- Git Checkout¶
- A Note Regarding SSL Backends¶
- SSL Certificate Bundle¶
Can’t install pycurl on Python 3.9, window 10, Pycharm but with Python 3.6 . #710
Prior to creating an issue, please review the troubleshooting documentation:
http://pycurl.io/docs/dev/troubleshooting.html
I did research for some time.
What did you try to do?
I try to find what the problem is. I try to install several Python version to check if it work with pycurl.
What happened?
And the Python 3.6 is working well currently. It install pycurl 7.43.0.5 when I use «pip install» command. When I try to install the lastest pycurl version, it give me the ERROR: Command errored out with exit status 10:
Another error when I try to install this with Python 3.9: https://www.lfd.uci.edu/
gohlke/pythonlibs/#pycurl
pycurl: libcurl link-time ssl backends (schannel) do not include compile-time ssl backend (openssl)
What did you expect to happen?
I would like to install pycurl on Python 3.9 smoothly.
What is the PycURL version?
What is your Python version?
What is your operating system and its version?
Windows 10 ( Lastest version )
Other versions
If your report references any software besides PycURL, for example pip,
what are the versions of this software? ( pip —version , etc.)
Is this the most recent PycURL release?
The text was updated successfully, but these errors were encountered:
Hey thanks alot @animax1991, I have the exact same issue on python 3.9.7 with windows 10 and I was about to write this issue ticket. I was trying to fix it the same way as you are and have gotten the same open-ssl error and now I’m also stuck. Hope @pycurl, @p, @swt2c fixes this soon
Источник
Install pycurl on windows #657
What happened?
Recently I want to install pycurl, but i met a problem when I use pip install pycurl and it infomationed that ‘Please specify —curl-dir’. But when I read setup.py I find out what you have written in this file that ‘Windows users have to pass —curl-dir parameter’, how I should do to pass that parameter? By using ‘#’ where this parameter appear?
What is the PycURL version?
7.43.0.6(acturally most recent version of pycurl unless using whl to install
What is your Python version?
What is your operating system and its version?
Microsoft Windows 10 profrssional
The text was updated successfully, but these errors were encountered:
I have not built windows binaries for the most recent release, you need to install from source or someone can contribute the binaries.
Yeah, tried everything myself, cant get this installed, not with pip nor easy_install.
@p Your documentation states that As of version 7.43.0, PycURL provides binary wheels for Windows . Is this no longer the case? Is there a reason why these are not longer being provided?
Are there instructions for how to build a whl file for pycurl?
If you’d like to submit a PR removing that language I’ll merge it.
The reason I haven’t done windows builds is they require a significant time to produce for each release.
Per #678 the winbuild code seems to have gotten broken at some point.
Would it be fine to build wheels of Github Actions and publish it to PyPI rather than generating manually? I would like to help :).
@naveen521kk This was attempted at some point however the CI dependencies were used which were fixed (i.e. outdated) versions. To build releases all of the dependencies need to be current.
If you or anyone wishes to tackle this project, I suggest starting with getting the builds working locally on windows because that is a whole endeavor in itself and without understanding that I don’t think you’ll be successful in producing release-level builds.
Thanks for the reply. When posting that comment I was successful in getting the wheel built working locally and on Github Actions, I just wanted to know if the contribution would be accepted. At that time this project didn’t compile with Python 3.9, but it does now, so I’ll need to add that also.
I would rebase that branch and will make a PR for review.
Rebasing made the wheel built fail or rather pycurl doesn’t build with MSVC
@naveen521kk The easy.c code is wrong for Python 3.0 — 3.7. But easy to fix though:
@p Please fix this.
I am happy to merge a PR with that fix if it passes CI.
Git Installed
Curl Installed
Path Added
When i try to install pycurl this is what i get (I am installing pycurl via git)
× python setup.py egg_info did not run successfully. │ exit code: 10 ╰─> [1 lines of output] Please specify —curl-dir=/path/to/built/libcurl [end of output]
This seems like a path problem but I have already added paths in the env variable as follows
C:WindowsSystem32curl.exe
C:curlbincurl.exe
C:WindowsSysWOW64curl.exe
Git Installed Curl Installed Path Added When i try to install pycurl this is what i get (I am installing pycurl via git)
× python setup.py egg_info did not run successfully. │ exit code: 10 ╰─> [1 lines of output] Please specify —curl-dir=/path/to/built/libcurl [end of output] This seems like a path problem but I have already added paths in the env variable as follows
C:WindowsSystem32curl.exe C:curlbincurl.exe C:WindowsSysWOW64curl.exe
As noted in the error message, you need to use the —curl-dir argument to specify the path to libcurl not curl.exe.
I used that argument as well, doesn’t work my curl folder has does not have this folder built/libcurl
Источник
PycURL Installation¶
NOTE: You need Python and libcurl installed on your system to use or build pycurl. Some RPM distributions of curl/libcurl do not include everything necessary to build pycurl, in which case you need to install the developer specific RPM which is usually called curl-dev.
Distutils¶
Build and install pycurl with the following commands:
$VER should be substituted with the pycurl version number, e.g. 7.10.5.
Note that the installation script assumes that ‘curl-config’ can be located in your path setting. If curl-config is installed outside your path or you want to force installation to use a particular version of curl-config, use the ‘–curl-config’ command line option to specify the location of curl-config. Example:
If libcurl is linked dynamically with pycurl, you may have to alter the LD_LIBRARY_PATH environment variable accordingly. This normally applies only if there is more than one version of libcurl installed, e.g. one in /usr/lib and one in /usr/local/lib.
PycURL requires that the SSL library that it is built against is the same one libcurl, and therefore PycURL, uses at runtime. PycURL’s setup.py uses curl-config to attempt to figure out which SSL library libcurl was compiled against, however this does not always work. If PycURL is unable to determine the SSL library in use it will print a warning similar to the following:
It will then fail at runtime as follows:
To fix this, you need to tell setup.py what SSL backend is used:
Note: as of PycURL 7.21.5, setup.py accepts —with-openssl option to indicate that libcurl is built against OpenSSL/LibreSSL/BoringSSL. —with-ssl is an alias for —with-openssl and continues to be accepted for backwards compatibility.
You can also ask setup.py to obtain SSL backend information from installed libcurl shared library, as follows:
python setup.py –libcurl-dll=libcurl.so
An unqualified libcurl.so would use the system libcurl, or you can specify a full path.
easy_install / pip¶
If you need to specify an alternate curl-config, it can be done via an environment variable:
The same applies to the SSL backend, if you need to specify it (see the SSL note above):
pip and cached pycurl package¶
If you have already installed pycurl and are trying to reinstall it via pip with different SSL options for example, pip may reinstall the package it has previously compiled instead of recompiling pycurl with newly specified options. More details are given in this Stack Overflow post.
To force pip to recompile pycurl, run:
Windows¶
There are currently no official binary Windows packages. You can build PycURL from source or use third-party binary packages.
Building From Source¶
Building PycURL from source is not for the faint of heart due to the multitude of possible dependencies and each of these dependencies having its own directory structure, configuration style, parameters and quirks. Additionally different dependencies have different settings for MSVCRT usage, and an application must have all of its parts agreeing on a single setting. If you decide to build PycURL from source it is advisable to look through the winbuild.py script — it is used to build the official binaries and contains a wealth of information for compiling PycURL’s dependencies on Windows.
If you are compiling PycURL from source it is recommended to compile all of its dependencies from source as well. Using precompiled libraries may lead to multiple MSVCRT versions mixed in the resulting PycURL binary, which will not be good.
If PycURL is to be linked statically against its dependencies, OpenSSL must be patched to link to the DLL version of MSVCRT. There is a patch for this in winbuild directory of PycURL source.
For a minimum build you will just need libcurl source. Follow its Windows build instructions to build either a static or a DLL version of the library, then configure PycURL as follows to use it:
Note that —curl-dir must point not to libcurl source but rather to headers and compiled libraries.
If libcurl and Python are not linked against the same exact C runtime (version number, static/dll, single-threaded/multi-threaded) you must use —avoid-stdio option (see below).
Additional Windows setup.py options:
—use-libcurl-dll : build against libcurl DLL, if not given PycURL will be built against libcurl statically.
—libcurl-lib-name=libcurl_imp.lib : specify a different name for libcurl import library. The default is libcurl.lib which is appropriate for static linking and is sometimes the correct choice for dynamic linking as well. The other possibility for dynamic linking is libcurl_imp.lib .
—with-openssl : use OpenSSL/LibreSSL/BoringSSL crypto locks when libcurl was built against these SSL backends.
—with-ssl : legacy alias for —with-openssl .
—openssl-lib-name=»» : specify a different name for OpenSSL import library containing CRYPTO_num_locks. For OpenSSL 1.1.0+ this should be set to an empty string as given here.
—avoid-stdio : on Windows, a process and each library it is using may be linked to its own version of the C runtime (MSVCRT). FILE pointers from one C runtime may not be passed to another C runtime. This option prevents direct passing of FILE pointers from Python to libcurl, thus permitting Python and libcurl to be linked against different C runtimes. This option may carry a performance penalty when Python file objects are given directly to PycURL in CURLOPT_READDATA, CURLOPT_WRITEDATA or CURLOPT_WRITEHEADER options. This option applies only on Python 2; on Python 3, file objects no longer expose C library FILE pointers and the C runtime issue does not exist. On Python 3, this option is recognized but does nothing. You can also give —avoid-stdio option in PYCURL_SETUP_OPTIONS environment variable as follows:
A good setup.py target to use is bdist_wininst which produces an executable installer that you can run to install PycURL.
You may find the following mailing list posts helpful:
winbuild.py¶
This script is used to build official PycURL Windows packages. You can use it to build a full complement of packages with your own options or modify it to build a single package you need.
MS Visual C++ 9/2008 for Python winbuild.py assumes all programs are installed in their default locations, if this is not the case edit it as needed. winbuild.py itself can be run with any Python it supports.
Using PycURL With Custom Python Builds¶
As of version 7.21.5, the official binary packages of PycURL are linked statically against all of its dependencies except MSVCRT. This means that as long as your custom Python build uses the same version of MSVC as the corresponding official Python build as well as the same MSVCRT linking setting (/MD et. al.), an official PycURL package should work.
If your Python build uses different MSVCRT settings or a different MSVC version from the official Python builds, you will need to compile PycURL from source.
If the C runtime library (MSVCRT.DLL) versions used by PycURL and Python do not match, you will receive a message like the following one when trying to import pycurl module:
To identify which MSVCRT version your Python uses use the application profiling feature of Dependency Walker and look for msvcrt.dll variants being loaded. You may find the entire thread starting here helpful.
Git Checkout¶
In order to build PycURL from a Git checkout, some files need to be generated. On Unix systems it is easiest to build PycURL with make :
To specify which curl or SSL backend to compile against, use the same environment variables as easy_install/pip, namely PYCURL_CURL_CONFIG and PYCURL_SSL_LIBRARY .
To generate generated files only you may run:
This might be handy if you are on Windows. Remember to run make gen whenever you change sources.
To generate documentation, run:
Generating documentation requires Sphinx to be installed.
A Note Regarding SSL Backends¶
libcurl’s functionality varies depending on which SSL backend it is compiled against. For example, users have reported problems with GnuTLS backend. As of this writing, generally speaking, OpenSSL backend has the most functionality as well as the best compatibility with other software.
If you experience SSL issues, especially if you are not using OpenSSL backend, you can try rebuilding libcurl and PycURL against another SSL backend.
SSL Certificate Bundle¶
libcurl, and PycURL, by default verify validity of HTTPS servers’ SSL certificates. Doing so requires a CA certificate bundle, which libcurl and most SSL libraries do not provide.
Источник
C:Python27>pip install pycurl
Downloading/unpacking pycurl
Running setup.py (path:c:usersasusappdatalocaltemppip_build_asuspycurlsetup.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
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 10 in c:usersasusappdatalocaltemppip_build_asuspycurl
Storing debug log for failure in C:Usersasuspippip.log
-
Вопрос заданболее трёх лет назад
-
5818 просмотров
Пригласить эксперта
Его нужно откомпилировать, если вам это делать лень, то всегда можно скачать cкомпилированную версию библиотеки с сайта lfd.uci.edu.
Не ответ на текущий вопрос. Но помощь в целом.
Чую вы хотите парсингом заняться. Когда я с php перешёл на питон. И появилась задача спарсить несколько сайтов. Тоже первым была мысль в сторону pycurl. Но намууучился я с ним.
А вот потом открыл для себя библиотеку urllib и urllib2.
Советую использовать их. Если только постигаете питон.
Для парсинга по меткам(тегам) удобна следующая библиотека: lxml
Скачивать под винду удобно тут. Ибо не все пакеты в винде компилируются. А тут сразу инсталеры именно под виндовс.
-
Показать ещё
Загружается…
09 февр. 2023, в 13:28
777 руб./за проект
12 февр. 2023, в 21:32
80000 руб./за проект
12 февр. 2023, в 21:30
2900 руб./за проект
Минуточку внимания
4 ответа
У меня была та же проблема. Я смог установить его с помощью easy_install вместо:
easy_install pycurl
Для easy_install см. setuptools.
reggie
15 нояб. 2015, в 10:42
Поделиться
Это действительно проблема. Не нужно обновлять pip или легко устанавливать, как это часто советуют, ну, это не повредит обновлению, но у вас все еще будет проблема, пока вы:
- установить пакеты libcurl4-gnutls-dev librtmp-dev
- pip install pycurl
Работала так же в Linux
dlewin
13 дек. 2017, в 11:36
Поделиться
Вот простые шаги, которые я сделал, чтобы обойти это:
-
Загрузите колесо нужной вам версии здесь: https://www.lfd.uci.edu/~gohlke/pythonlibs/
-
тогда вы можете установить это так:
pip install C:samplesample_dirwhl_file_downloaded
Вы должны знать, сможете ли вы импортировать в ваши файлы Python
stegnerd
11 янв. 2019, в 13:18
Поделиться
Так сказал Хай Ву, вам нужно сначала установить cURL.
Вот страница dowload: http://curl.haxx.se/download.html
Я предлагаю вам установить его в свой каталог C:/, или если вы уже установили его в другом месте, скопируйте файл curl.exe в папку c:/
Когда закончите, вы можете попробовать его, перейдя в приглашение cmd:
cd c:/
curl "your-curl-request"
Если он работает, то завиток правильно установлен, и вы можете установить pycurl с помощью пипа.
Mickael_Paris
13 июль 2015, в 15:02
Поделиться
Ещё вопросы
- 0PrezentDoctrineTranshableBundle без резервной локали
- 1Изменить результат вывода np.array
- 1Быстрый способ создать мульти-массив с тем же размером другого без итерации?
- 1Android ThreadSafeClientConnManager Тайм-ауты?
- 0ООП — есть ли недостатки в использовании статических методов?
- 0комментарии в drupal auto width
- 0Кто-нибудь уже использовал библиотеку Triangle / Triangle ++ в проекте C ++? (триангуляция Делоне)
- 0Можете ли вы добавить N-го ребенка в JS?
- 1Отображение списка просмотра Android на основе выбора списка
- 1Различные коэффициенты полиномиальной регрессии с R и Python
- 1Дублирующий пакет при развертывании apk в эмуляторе, ошибка INSTALL_FAILED_DUPLICATE_PACKAGE
- 0Перезапись URL отключить открытие файлов
- 0Отправить FlashMessenger
- 3google.auth.exceptions.DefaultCredentialsError:
- 1Как указать название типа конфигурации?
- 1Matplotlib соединяет конец данных после обновления анимации
- 1Как десериализовать с помощью XStream?
- 0Box2D: заставлять тела падать через случайные интервалы
- 1Выражение, которое возвращает содержимое между двумя DateTimes в файле журнала, если определенный токен остается между
- 0Перестал работать mysqldump с преобразованием в MariaDB — set-gtid-purged = OFF проблема?
- 1Как справиться с недоступностью холста в JavaScript?
- 1Функция Javascript не получает целое значение
- 0Двоичное дерево поиска остается пустым?
- 1NullPointerException и «Достигнут предел глубины», отправляющий SOAP после первой попытки
- 0angularjs присваивает всем html-элементам определенного типа собственную область видимости
- 0Соответствующая строка без определенного шаблона между определенными местами
- 1Приложение Android неожиданно останавливается при сборке … Проблема с файлом XML-макета?
- 1Тестирование аудио файла с использованием C #
- 064-битные и 32-битные исполняемые файлы C ++ с code :: blocks
- 0Встроенный дисплей для div внутри div
- 1Как перевести звонки на голосовую почту в android?
- 1фильтр намерений не работает
- 1Извлекать числовые и текстовые части строки в различных форматах
- 1Поддержка Android 2.0 и OpenGL ES 2.0
- 1«Базовое имя администратора очередей» в Websphere MQ Explorer /
- 1Android — определение элементов любого макета на новом экране (действие)
- 1Получить HTML-источник как HTML-объект с возможностью работы в нем с помощью операций DOM
- 0Как получить список изображений для удаления из одного запроса MYSQL
- 1SAX разбор в андроиде
- 0Как динамически добавлять шаблоны на страницу в Angular
- 0Doxygen — неправильный порядок модулей в pdf
- 1Передача параметров из функции в другую функцию, где параметры имеют одинаковое имя в Python [closed]
- 0Тайм-аут транспортира из-за $ timeout и $ interval
- 0Как вводить данные SQL, только если ввод не пустой
- 1Ошибка Entity Framework 6 — ICollection не содержит определения для подобъекта
- 0Нужна помощь с отображением ежемесячного платежа клиенту и оценкой HTML.
- 0Липкие формы в php
- 0JQuery добавить — для ввода, но только добавить дважды
- 1Как создать новое виртуальное поле в классе данных в Entity Framework
- 1Как скопировать целочисленное значение c # datetime в c # [duplicate]
I ran pip install pycurl and got crazy error
Collecting pycurl Downloading pycurl-7.43.0.1.tar.gz (195kB) 100% |████████████████████████████████| 204kB 6.0MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "/tmp/pip-build-msc3b_98/pycurl/setup.py", line 104, in configure_unix stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'curl-config' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-msc3b_98/pycurl/setup.py", line 841, in <module> ext = get_extension(sys.argv, split_extension_source=split_extension_source) File "/tmp/pip-build-msc3b_98/pycurl/setup.py", line 508, in get_extension ext_config = ExtensionConfiguration(argv) File "/tmp/pip-build-msc3b_98/pycurl/setup.py", line 72, in __init__ self.configure() File "/tmp/pip-build-msc3b_98/pycurl/setup.py", line 108, in configure_unix raise ConfigurationError(msg) __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-msc3b_98/pycurl/
Apparently pip doesn’t really resolve all of pycurl’s dependencies.
Run apt-cache depends python-pycurl
python-pycurl Depends: python Depends: python Depends: <python:any> python Depends: libc6 Depends: libcurl3-gnutls Suggests: libcurl4-gnutls-dev Suggests: python-pycurl-dbg Suggests: python-pycurl-doc
See the Suggests. So run
sudo apt-get install libcurl4-gnutls-dev sudo apt-get install python-pycurl-dbg sudo apt-get install python-pycurl-doc
Run pip install pycurl, but that still fails due to x86_64-linux-gnu-gcc…
Collecting pycurl Using cached pycurl-7.43.0.1.tar.gz Building wheels for collected packages: pycurl Running setup.py bdist_wheel for pycurl ... error Complete output from command /home/elt/.virtualenvs/de/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bcazyxsx/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpfk6sldmcpip-wheel- --python-tag cp35: Using curl-config (libcurl 7.47.0) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.5 creating build/lib.linux-x86_64-3.5/curl copying python/curl/__init__.py -> build/lib.linux-x86_64-3.5/curl running build_ext building 'pycurl' extension creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCURL_VERSION="7.43.0.1" -DHAVE_CURL_GNUTLS=1 -DHAVE_CURL_SSL=1 -I/usr/include/python3.5m -I/home/elt/.virtualenvs/de/include/python3.5m -c src/docstrings.c -o build/temp.linux-x86_64-3.5/src/docstrings.o In file included from src/docstrings.c:4:0: src/pycurl.h:168:30: fatal error: gnutls/gnutls.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
To save you time, do
# upgrade pip if necessary pip install --upgrade pip # remove current pycurl pip uninstall pycurl # set PYCURL_SSL_LIBRARY export PYCURL_SSL_LIBRARY=nss # recompile and install pycurl pip install --compile pycurl
Ref: http://pycurl.io/docs/latest/install.html