AttributeError: 'module' object has no attribute 'rcParams'
-柚子皮- 人工智能领域优质创作者 博客专家认证 2014-12-26 11:46:25 电脑系统win7 x64
电脑同时安装了python2.7和python3.4
也同时安装了matplotlib for 2.7 和3.4
在pycharm py文件中import matplotlib正常(解释器为python 3.4)
print(matplotlib.__file__ )
D:\python3.4.2\lib\site-packages\matplotlib\__init__.py
但在python console中import matplotlib出现错误:(解释器也为python 3.4)
AttributeError: 'module' object has no attribute 'rcParams'
网上在解决说:(应该是针对linux)
it looks like you have a matplotlib dir in your working directory that is being picked up and you probably don't want it.
You have the matplotlib source directory in your HOME directory and when you run from your home directory, it is being picked up instead of the installation directory. I usually name my src tree "mpl" to avoid this problem
这个好像不行