-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libcurl link-time ssl backend (nss) is different from compile-time #68
Comments
In my Linux Fedora distibution works after reinstall libcurl by running this command |
Thanks for trying wptools, @piuma! Currently, we don't specify an SSL backend in the build process, and we build our distribution on Mac OS X: >>> pycurl.version_info()[5]
'SecureTransport' The pycurl install doc recommends OpenSSL and points out that you can specify which SSL backend on setup: $ python setup.py --with-[openssl|gnutls|nss] install and, apparently, you can be specific in the
However, it seems best not to be specific. Your solution seems good, and others can try: (env)$ pip uninstall pycurl
(env)$ pip install --upgrade pip
(env)$ export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss|ssl]
(env)$ pip install pycurl If anyone knows of a way we could adjust our build process to make the distribution more robust, please let us know here. |
I ran into this issue after upgrading to Mac OS 10.13 High Sierra, and this worked for me: Upgrade openssl $ brew upgrade openssl
...
==> Pouring openssl-1.0.2m.high_sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2m: 1,792 files, 12.3MB Export flags and rebuild [wptools]$ export LDFLAGS="-L/usr/local/opt/openssl/lib"
[wptools]$ export CPPFLAGS="-I/usr/local/opt/openssl/include"
[wptools]$ pip install --no-cache-dir --compile --ignore-installed --install-option="--with-openssl" pycurl |
@siznax Have the same problem after upgrading to High Sierra. But when I try to use your pip install command, it doesn't appear to be using CPPFLAGS % ls /usr/local/opt/openssl/include/openssl/crypto.h % env | grep CPPFLAGS % sudo -H pip install --no-cache-dir --compile --ignore-installed --install-option="--with-openssl" pycurl |
@padodev, weird. I guess I would try it in a virtualenv, and also export LDFLAGS? And, check that your pip is up-to-date. |
Yes, LDFLAGS is exported % env | grep LDFLAGS |
I have same issue here,im on high Sierra `Running setup.py install for pycurl ... error
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-klzshss8/pycurl/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-0a5254vp-record/install-record.txt --single-version-externally-managed --compile --with-openssl" failed with error code 1 in /private/tmp/pip-build-klzshss8/pycurl/ |
For @ikelca and all those who stumble here, try this move from the pycurl github tracker pycurl/pycurl#530
|
pip install --no-cache-dir --compile --ignore-installed --install-option="--with-nss" pycurl Works for me for centos6 |
I solved the problem by using --global-option="--with-openssl". Thanks a lot. |
Steps to reproduce:
The text was updated successfully, but these errors were encountered: