【发布时间】:2013-11-29 05:38:11
【问题描述】:
我需要在 python 2.7 中使用绘图功能,因此我下载并安装了 matplotlib 包 (v1.3.1)。当我在 IDLE 中键入 import pylab 时,我得到一个异常,说 matplotlib 需要 dateutils。所以我安装了那个。然后我被告知需要 pyparsing,所以我安装了它。现在我收到需要 numpy 的消息
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import pylab
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pylab
File "C:\Python27\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 156, in <module>
from matplotlib.cbook import is_string_like
File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 28, in <module>
import numpy as np
ImportError: No module named numpy
有没有办法知道使用 pylab 所需的所有依赖项是什么,这样我就不必一个一个下载,或者我在安装过程中做错了什么导致这么多丢失的包?
【问题讨论】:
-
您是如何在没有所有依赖项的情况下安装 matplotlib 的?作为记录,列表在这里:matplotlib.org/users/installing.html#build-requirements
标签: python matplotlib