Python 为什么matplotlib不运行?

Python 为什么matplotlib不运行?,python,linux,matplotlib,Python,Linux,Matplotlib,我想使用matplotlib。我已将其安装为: sudo apt-get install python-matplotlib 在候机楼,我有: $ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotl

我想使用matplotlib。我已将其安装为:

sudo apt-get install python-matplotlib
在候机楼,我有:

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'1.3.1'
>>> matplotlib.__file__
 '/usr/lib/pymodules/python2.7/matplotlib/__init__.pyc'
 >>> mpl.get_configdir()
 '/home/azh2/.config/matplotlib'   
 >>>> mpl.get_cachedir()
 '/home/azh2/.cache/matplotlib'
$ from PIL import Image
from: can't read /var/mail/PIL
现在我想用它。因此,在pycharm终端中,我有:

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'1.3.1'
>>> matplotlib.__file__
 '/usr/lib/pymodules/python2.7/matplotlib/__init__.pyc'
 >>> mpl.get_configdir()
 '/home/azh2/.config/matplotlib'   
 >>>> mpl.get_cachedir()
 '/home/azh2/.cache/matplotlib'
$ from PIL import Image
from: can't read /var/mail/PIL
请问有什么问题?你能帮我解决吗?
非常感谢您的帮助。

您使用的是shell而不是python执行环境。

是什么让您认为这与matplotlib有关?