KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
190 stars 49 forks source link

failed to import _ssl problem #20

Closed andersontigerzhang closed 6 years ago

andersontigerzhang commented 6 years ago

In my environment, pyq failed to import _ssl, but python succeeded:

$ pyq --versions
PyQ 4.1.1
NumPy 1.12.1
KDB+ 3.5 (2017.05.02) l64
Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
$ python
Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import _ssl
>>> _ssl.__file__
'/data/statarb_n/equity_sys/anaconda2/lib/python2.7/lib-dynload/_ssl.so'
$ ls -l /data/statarb_n/equity_sys/anaconda2/lib/python2.7/lib-dynload/_ssl.so
-rwxr-xr-x 2 equity_sys statarb 246877 Dec 21  2016 /data/statarb_n/equity_sys/anaconda2/lib/python2.7/lib-dynload/_ssl.so
$ pyq
Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import _ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/statarb_n/equity_sys/anaconda2/lib/python2.7/site-packages/pyq/__init__.py", line 774, in __import__
    m = _imp(name, globals, locals, fromlist, level)
ImportError: /data/statarb_n/equity_sys/anaconda2/lib/python2.7/lib-dynload/_ssl.so: undefined symbol: SSL_get0_next_proto_negotiated
>>>
andersontigerzhang commented 6 years ago

Sorry, this is out fault. libssl.so was not pointing to the right version.

abalkin commented 6 years ago

@andersontigerzhang - I was about to say that. Glad you figured that out.