3

I'm trying to install PyOpenSSL 0.13 on my Macbook Pro (OSX version 10.11, El-Capitan). But it keeps failing. These are the steps I took

  1. Download and install Command Line Tools (OSX 10.11) for Xcode 7.3.1 from here
  2. $ virtualenv my-new-virtualenv
  3. $ source my-new-virtualenv/bin/activate
  4. $ pip install pyopenssl==0.13

When I do step #4, I get the following error:

OpenSSL/crypto/x509.h:17:10: fatal error: 'openssl/ssl.h' file not found
  #include <openssl/ssl.h>
       ^
  1 error generated.
  error: command 'cc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyopenssl

Here is the entire trace showing that error.

Why am I getting this error and how can I fix it??

Saqib Ali
  • 11,931
  • 41
  • 133
  • 272

1 Answers1

3

It appears you are missing the OpenSSL development headers, as mentioned by @Klaus D. This most likely happened because due to upgrading to El Capitan, these development headers were broken. It can usually be fixed by reinstalling your command line tools. If you have Homebrew, run this code: brew install openssl

Also, just out of curiosity, is there a particular reason why you want to use version 0.13? When I did $ pip install pyopenssl==0.14 I got no errors. See the bit on pyOpenSSL's documentation:

enter image description here

Community
  • 1
  • 1
Mangohero1
  • 1,832
  • 2
  • 12
  • 20
  • `$ brew install openssl ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). No changes to formulae.` – Saqib Ali Sep 29 '16 at 05:34
  • I'm using pyopenssl 0.13 because that is a requirement of my project at the moment. I will convince them to move up to 0.14 as you suggested because that installed fine. But in the meantime, do you know how to get pyopenssl 0.13 working? – Saqib Ali Sep 29 '16 at 05:36
  • For the moment, I do not. From what I could gather, there could be specific dependancies by which that particular version needs in order to be installed correctly. Those can be found on pyOpenSSL's website. – Mangohero1 Sep 29 '16 at 05:49
  • @SaqibAli So did you try installing it again after running the brew command? Did it give the same error? – numbermaniac Oct 01 '16 at 08:24
  • Follow-up question here: http://stackoverflow.com/questions/39836405/why-is-installation-of-pyopenssl-0-14-failing – Saqib Ali Oct 03 '16 at 16:41