can't import cbook/matplotlib v. 2.1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

can't import cbook/matplotlib v. 2.1.0

mfacorcoran
I've recently updated matplotlib to 2.1.0 and now when I try to import
matplotlib/pylab I get the following error that cbook cannot be imported:

% python
Python 2.7.14 (default, Sep 22 2017, 00:05:22)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Importing pyfits
Could not import pylab
Traceback (most recent call last):
  File "/Users/corcoran/.pythonrc", line 34, in <module>
    import matplotlib
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py",
line 124, in <module>
    from . import cbook
ImportError: cannot import name cbook

any ideas what might be going on?

Mike



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

Paul Hobson-2
Were you in the matplotlib source directory when you launched your python interpreter?
-p

On Tue, Oct 10, 2017 at 11:08 AM, mfacorcoran <[hidden email]> wrote:
I've recently updated matplotlib to 2.1.0 and now when I try to import
matplotlib/pylab I get the following error that cbook cannot be imported:

% python
Python 2.7.14 (default, Sep 22 2017, 00:05:22)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Importing pyfits
Could not import pylab
Traceback (most recent call last):
  File "/Users/corcoran/.pythonrc", line 34, in <module>
    import matplotlib
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py",
line 124, in <module>
    from . import cbook
ImportError: cannot import name cbook

any ideas what might be going on?

Mike



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

mfacorcoran
I don't think so.  I re-tried it from my home directory and got the same
error...

cheers

Mike




--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

Benjamin Root
How did you install matplotlib?

On Tue, Oct 10, 2017 at 2:20 PM, mfacorcoran <[hidden email]> wrote:
I don't think so.  I re-tried it from my home directory and got the same
error...

cheers

Mike




--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

mfacorcoran
using macports.  I'm on a macbook pro running 10.11.6.  I've used matplotlib
for the past 2-3 years; this is the first time I had this issue



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

Benjamin Root
Then exactly which version of the matplotlib package did you install from MacPorts? Just today, we had another bug report from another user using MacPorts and python 2.7 that turned out to be a packaging error on their part.

On Tue, Oct 10, 2017 at 2:49 PM, mfacorcoran <[hidden email]> wrote:
using macports.  I'm on a macbook pro running 10.11.6.  I've used matplotlib
for the past 2-3 years; this is the first time I had this issue



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

mfacorcoran
This is the python 2.7 version:  py27-matplotlib 2.1.0

I also checked the python3 version - that seems to work ok (btw)



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

Benjamin Root
Check to see if you have the latest package from macports, the version the other user had was 2.1.0_1, which indicates that there was at least a bugfix in their packaging. That _1 release did have another bug, where the backports package wasn't specified as a dependency in py27.

Ben Root

On Tue, Oct 10, 2017 at 3:06 PM, mfacorcoran <[hidden email]> wrote:
This is the python 2.7 version:  py27-matplotlib 2.1.0

I also checked the python3 version - that seems to work ok (btw)



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: can't import cbook/matplotlib v. 2.1.0

mfacorcoran
I have  py27-matplotlib @2.1.0_1+cairo+tkinter (active) installed

I just went back to the 2.0.2 version via:

% sudo port activate py27-matplotlib @2.0.2_0+cairo+tkinter

and that seems to have resolved the issue.  So it looks like there's
something strange with
the port of py27-matplotlib @2.1.0_1+cairo+tkinter

Mike



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users