-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
matplotlib 1.5.3 raise TypeError: 'module' object is not subscriptable on pylab.py #7186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would also suggest not using |
actually,I just have a try like this: import matplotlib
%matplotlib inline Looks like have many difference between CPython and PyPy such as execution model/ type system, I'll give a try to figure out the truth |
Ah, the problem is that IPython imports pylab
|
does it do so unconditionally? On Wed, Sep 28, 2016 at 9:42 AM, Thomas A Caswell notifications@github.com
|
IPython imports pylab when use |
eh… ipython still imports pylab? I thought that was deprecated a long time ago? |
Yes, are you sure it's happening with |
Actually, scratch that. There's a lot of indirection to trawl through, but it appears there is a |
ipython/ipython#9998 <- IPython PR to fix at least some of this. |
and for 1.5.3 + the |
Also smuggled in some minor reformattings. Fixes matplotlib#7186. Supersedes matplotlib#7187 (see discussion there).
matplotlib:1.5.3
python version: 2.7.10 (0e2d9a73f5a1818d0245d75daccdbe21b2d5c3ef, Sep 27 2016, 02:22:00)\n[PyPy 5.4.1 with GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
CentOS 7.1
pip
this code raise:
TypeError: 'module' object is not subscriptable
in pypy,and matplotlib use this code in
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/pylab.py#L286
It looks like in python3.4.1,also raise this error
should it modify to:
for better compatibility?
BTW:maybe have something wrong because I found python 2.7.5 also raise
TypeError: 'module' object has no attribute '__getitem__'
in this line but have no one reportThe text was updated successfully, but these errors were encountered: