【发布时间】:2016-02-26 16:54:16
【问题描述】:
当我想在 IDLE 中导入 matplotlib 时。出现以下错误:
ImportError: No module named matplotlib
我用的是mac,我的bash_profile中python的PATH是:
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
几天前我试图从我的mac上卸载python,所以我不确定我是否损坏了内置的python。
我该如何解决这个问题?
【问题讨论】:
-
你安装了matplotlib吗?
-
我使用 sudo easy_install matplotlib 来安装它。在使用 python a.py 的 shell 中它工作正常。但仍然无法在 IDLE 中找到模块。
标签: python matplotlib