when I run a python module which imports ssl.py , error occurs . but it's ok to run the straight python.
Show older comments
the error information is: Python Error: ImportError: dlopen(/Users/garyzhang/anaconda2/lib/python2.7/lib-dynload/_ssl.so, 2): Symbol not found: _SSL_CTX_set_alpn_protos Referenced from: /Users/anaconda2/lib/python2.7/lib-dynload/_ssl.so Expected in: /Applications/MATLAB_R2016a.app/bin/maci64/libssl.1.0.0.dylib in /Users/anaconda2/lib/python2.7/lib-dynload/_ssl.so
Accepted Answer
More Answers (3)
Bo Li
on 25 Jul 2016
0 votes
Did you call "import matlab.engine" before "import ssl"? What happens if you call "import ssl" before "import matlab.engine"?
It looks like the library used by your ssl.py is not compatible with the libssl shipped by MATLAB.
gary zhang
on 25 Jul 2016
0 votes
gary zhang
on 27 Jul 2016
0 votes
2 Comments
Robert Snoeberger
on 27 Jul 2016
Hi Gary, Thanks for trying the workaround. That is very interesting that flag = 0 worked for you. I believe that 0 is the value of RTLD_LOCAL. Just curious, what was the value of flag before you set it to 0? You should be able to check with py.sys.getdlopenflags. For me, the value is 2.
gary zhang
on 28 Jul 2016
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!