KxSystems / pyq

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

pyq does not work with pydash #21

Closed andersontigerzhang closed 7 years ago

andersontigerzhang commented 7 years ago

I found that pyq does not work with pydash, which has its own definition for collections. I don't know how to workaround this problem, should I log an issue for pydash?

$ 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)]
[18:00:38]azhang@wplsngen18[env=conda.q35][~]
$ 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 pydash
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)
  File "/data/statarb_n/equity_sys/anaconda2/lib/python2.7/site-packages/pydash/__init__.py", line 114, in <module>
    from .collections import (
  File "/data/statarb_n/equity_sys/anaconda2/lib/python2.7/site-packages/pyq/__init__.py", line 777, in __import__
    _c.update((getattr(m, cname), conv) for cname, conv in pairs)
  File "/data/statarb_n/equity_sys/anaconda2/lib/python2.7/site-packages/pyq/__init__.py", line 777, in <genexpr>
    _c.update((getattr(m, cname), conv) for cname, conv in pairs)
AttributeError: 'module' object has no attribute 'OrderedDict'
sashkab commented 7 years ago

Please upgrade to the PyQ 4.1.2.

pip install -U pyq

This is duplicate of #18.