在Python中导入matplotlib [英] Importing matplotlib in Python
本文介绍了在Python中导入matplotlib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Mac OS 10.13上安装了anaconda和Python 3.6.3.我正在学习Python,希望导入matplotlib.但是,当我尝试从用Python做数学"的第2章中运行程序时,总是收到ModuleNotFoundError.
I have anaconda and Python 3.6.3 on Mac OS 10.13. I am in the process of learning Python and wanted import matplotlib. However, I keep getting a ModuleNotFoundError when I try to run the program from Chapter 2 of "Doing Math with Python".
关于如何克服这一障碍的任何想法?
Any ideas on how to overcome this hurdle?
推荐答案
使用anaconda,可以使用 conda
完成matplotlib的安装;在命令行的终端中,键入:
With anaconda, the installation of matplotlib can be done with conda
; on the command line, in terminal, type:
conda install matplotlib
这篇关于在Python中导入matplotlib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文