gpt4 book ai didi

python - 为什么 matplotlib 无法运行?

转载 作者:太空宇宙 更新时间:2023-11-04 04:40:40 26 4
gpt4 key购买 nike

我想使用 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'

现在我想使用它。所以在 pycharm 终端我有:

$ from PIL import Image
from: can't read /var/mail/PIL

请问是什么问题?你能帮我解决吗?非常感谢您的帮助。

最佳答案

您位于shell中,而不是 python 执行环境中。

关于python - 为什么 matplotlib 无法运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35456648/

26 4 0
文章推荐: c - 前向声明抛出重定义错误
文章推荐: linux - SSH 进入 AWS EC2 实例给出权限被拒绝(公钥)
文章推荐: html - 当用户仅使用 css 放大时,是否可以保持
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com