AttributeError: 'module' object has no attribute 'cbook'

狂风中的少年 提交于 2019-11-28 00:17:27

I don't know for sure that this is causing your problem, but you are running your code in the wrong Python environment: C:\Users\Jay\AppData\Local\Enthought\Canopy\System\ You should be running it in C:\Users\Jay\AppData\Local\Enthought\Canopy\User

See https://support.enthought.com/entries/23646538-Make-Canopy-User-Python-be-your-default-Python

and http://docs.enthought.com/canopy/configure/faq.html#where-are-all-of-the-python-packages-in-my-user-python-environment

Sriharsha Sammeta

Try this:

  1. Close your jupyter notebook and terminate ipython.
  2. Restart Terminal
  3. Enter this command in Terminal:

export LANG=en_US.UTF-8;export LC_ALL=en_US.UTF-8
  1. Re-run your ipython / Jupyter notebook now. It works like a charm.
user2374944
conda install matplotlib --force

You can find which 'matplotlib.py' is imported and then open that file and check if it has 'cbook' or not.

import imp
imp.find_module("matplotlib")

i had the same problem and it was because of this line : from sys import stdout i deleted this import and the problem is gone now

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!