Comments (9)
@kaizeng - what python version are you using?
Please provide the output of pyq --versions
command.
from pyq.
@abalkin Thanks very much for your very prompt reply. Here is the information:
$ pyq --version
Python 2.7.12 :: Anaconda custom (64-bit)
from pyq.
@kaizeng - sorry, I asked for pyq --versions
with an s
at the end. This is a pyq specific option that print more information than just --version
. Also, what are the versions of scipy
and statsmodels
?
from pyq.
@abalkin - sorry i misread it. Here is the pyq version:
$ pyq --versions
PyQ 4.1.1
NumPy 1.11.2
KDB+ 3.3 (2016.02.02) l64
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
and
>>> scipy.__version__
'0.18.1'
and
>>> statsmodels.__version__
'0.8.0'
from pyq.
@kaizeng - I was able to reproduce your issue. We will fix it in the next release. Meanwhile, please try the following workaround:
import pyq
del pyq.lazy_converters['collections']
from statsmodels.compat.collections import OrderedDict
Check that the conversion works:
>>> pyq.K(OrderedDict([('a',1)]))
k('(,`a)!,1')
from pyq.
@abalkin Thank you very much! I really appreciate your help! The workaround is working perfectly in the meantime!
from pyq.
I was able to reproduce this issue without statsmodels by simply creating a "compat" directory
compat/
__init__.py
collections.py
with an empty __init__.py
and the following line in collections.py
:
from collections import OrderedDict
With this setup,
$ pyq
Python 2.7.13 (default, Jun 13 2017, 14:40:28)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from compat.collections import OrderedDict
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/a/.virtualenvs/d/lib/python2.7/site-packages/pyq/__init__.py", line 774, in __import__
m = _imp(name, globals, locals, fromlist, level)
File "compat/collections.py", line 2, in <module>
from collections import OrderedDict
File "/Users/a/.virtualenvs/d/lib/python2.7/site-packages/pyq/__init__.py", line 777, in __import__
_c.update((getattr(m, cname), conv) for cname, conv in pairs)
File "/Users/a/.virtualenvs/d/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'
I feel this is a bug in statsmodels rather than pyq because adding
from __future__ import absolute_import
at the top of the compat/collections.py
file fixes the problem.
from pyq.
The issue has been fixed in the third party code. See statsmodels/statsmodels#3976.
from pyq.
@abalkin Thanks a lot for the updates! I really appreciate your help!
from pyq.
Related Issues (20)
- [Windows] fail to load HOT 14
- pip install pyq fails HOT 2
- Pyq on 64-bit Centos 7 failes with Invalid ELF header HOT 2
- pyq doesn't run faster parallelly HOT 2
- Using PyQ in PyCharm in Windows HOT 8
- No module named 'pyq' in macOs Catalina 10.15.4 HOT 5
- q can't find python package in virtual env HOT 20
- pandas 1.0.3 incompatibility HOT 10
- Running a background q timer within an IPython session HOT 4
- stdout from Python is always behind stdout from Q when direct stdout to a file HOT 2
- PyQ 5.0 conda release for python 3.6 HOT 4
- Best practices for read only QHOME HOT 2
- support for .z.pi HOT 4
- What's The Proper Way To Add A Column To q() Table, From Python List or NumpyArrary? HOT 2
- Unable to install pyq on py3.6 venv HOT 1
- Running pyq in terminal resulting in exit .pyq.run line of code executing from python.q file HOT 5
- Python 3.10 compatiblity HOT 8
- Async messages get queued until sync message HOT 1
- installation error: subprocess-exited-with-error HOT 1
- Is there a way to have q syntax highlighting in cells starting with `%%q` in jupyter notebook? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyq.