title: Installing pycurl on MacOS. (link-time ssl backend (none/other) is different from compile-time ssl backend (openssl))
body: <p>I'm trying to install pycurl in a venv on MacOS Sierra.  I've cleaned things up, installed openssl via brew, told pip to link to that openssl installation and tried loading the module.  It complains about "none/other" being different from "openssl".</p>
  
  <pre><code>ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
  </code></pre>
  
  <p>It seems the package was compiled as expected but it's trying to load the wrong ssl library.  Any suggestions on addressing this?  I've tried google search after google search.</p>
  
  <p>The full installation attempt:</p>
  
  <pre><code>(venv) R5106464:venv m106093$ brew uninstall openssl
  Error: No such keg: /usr/local/Cellar/openssl
  (venv) R5106464:venv m106093$ pip uninstall pycurl
  Skipping pycurl as it is not installed.
  (venv) R5106464:venv m106093$ brew install openssl
  ==&gt; Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2q.sierra.bottl
  Already downloaded: /Users/m106093/Library/Caches/Homebrew/downloads/b6dec2b57ee88a3cb02335284971b3b1e902d8b43fef115b456a971e5d0981ce--openssl-1.0.2q.sierra.bottle.tar.gz
  ==&gt; Pouring openssl-1.0.2q.sierra.bottle.tar.gz
  ==&gt; 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
  
  openssl 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 openssl first in your PATH run:
    echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' &gt;&gt; ~/.bash_profile
  
  For compilers to find openssl you may need to set:
    export LDFLAGS="-L/usr/local/opt/openssl/lib"
    export CPPFLAGS="-I/usr/local/opt/openssl/include"
  
  For pkg-config to find openssl you may need to set:
    export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
  
  ==&gt; Summary
    /usr/local/Cellar/openssl/1.0.2q: 1,794 files, 12.3MB
  (venv) R5106464:venv m106093$ PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl
  Collecting pycurl
    Downloading https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz (214kB)
      100% |████████████████████████████████| 215kB 3.6MB/s 
  Installing collected packages: pycurl
    Running setup.py install for pycurl ... done
  Successfully installed pycurl-7.43.0.2
  (venv) R5106464:venv m106093$ python
  Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12) 
  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import pycurl
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
  &gt;&gt;&gt; 
  </code></pre>