This may sound like a copy of this question, but not only all solutions do not work, but the question itself is quite old, and everything can change in the mean time.
Here is my problem:
$ python -c "import ssl; print ssl.OPENSSL_VERSION"
OpenSSL 0.9.8zg 14 July 2015
$ openssl version
OpenSSL 1.0.1e 11 Feb 2013
I am trying to run a python script that tells me that "OpenSSL 0.9.8 is no longer supported." I installed OpenSSL, as you can see, on my machine (OSX 10.10.5) this is the correct version, but for some reason Python (2.7.12) refers to the old one. What to do?
thank
EDIT:
Let me add a few exits so that you all see that I have followed all the instructions given in other sections of StackOverflow:
$ which openssl
/opt/local/bin/openssl
$ openssl version
OpenSSL 1.0.1e 11 Feb 2013
$ brew update
Already up-to-date.
$ brew install openssl
Warning: openssl-1.0.2h_1 already installed
$ brew link
Warning: Already linked: /usr/local/Cellar/openssl/1.0.2h_1
To relink: brew unlink openssl && brew link openssl
$ openssl version -a
OpenSSL 1.0.1e 11 Feb 2013
built on: Tue Feb 26 05:00:07 PST 2013
platform: darwin64-x86_64-cc
options: bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: /usr/bin/clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/opt/local/etc/openssl"
$ brew install python
Warning: python-2.7.12 already installed
$ sudo ln -s /usr/local/Cellar/python/2.7.8_2/bin/python /usr/local/bin/python
Password:
ln: /usr/local/bin/python: File exists
$ python
Python 2.7.12
$ python -c "import ssl; print ssl.OPENSSL_VERSION"
OpenSSL 0.9.8zg 14 July 2015
source
share