Python 获取错误:';没有名为';matplotlib.style';而matplotlib工作正常

Python 获取错误:';没有名为';matplotlib.style';而matplotlib工作正常,python,python-3.x,matplotlib,pycharm,Python,Python 3.x,Matplotlib,Pycharm,我在Ubuntu14.04.1LTS和python3上使用PyCharm。我想使用'ggplot'样式的模块,但是我得到了一个'no module named'错误。Matplotlib 1.3.1已经安装并运行良好(我最近更新了它) 我还检查了matplotlibrc文件和matplotlibtool,所有内容似乎都符合文档的建议。有人知道我能做什么吗?根据,自版本1.4起,样式包就添加到matplotlib中 因此,通过以下方式检查matplotlib版本: $ pip freeze | g

我在Ubuntu14.04.1LTS和python3上使用PyCharm。我想使用'ggplot'样式的模块,但是我得到了一个'no module named'错误。Matplotlib 1.3.1已经安装并运行良好(我最近更新了它)

我还检查了matplotlibrc文件和matplotlibtool,所有内容似乎都符合文档的建议。有人知道我能做什么吗?

根据,自版本1.4起,
样式
包就添加到matplotlib中

因此,通过以下方式检查matplotlib版本:

$ pip freeze | grep matplotlib
matplotlib==1.3.1
$ sudo pip install matplotlib --upgrade

$ pip freeze | grep matplotlib
matplotlib==1.5.1
通过将matplotlib升级至最新版本

$ pip freeze | grep matplotlib
matplotlib==1.3.1
$ sudo pip install matplotlib --upgrade

$ pip freeze | grep matplotlib
matplotlib==1.5.1
这对我来说很好

import matplotlib.pyplot as plt
plt.style.use('ggplot')

我需要首先通过
sudo apt get install libfreetype6 dev
升级libfreetype6,然后在pycharm中更新它。但是,它工作得很好。谢谢。