matplotlib - 无法安装 matplotlib

标签 matplotlib

当我在 64 位 Windows 中安装 matplotlib 时,它需要 numpy。然后我安装了 numpy 并再次安装了 matplotlib 然后它说

    numpy: 1.7.1
freetype2: found, but unknown version (no pkg-config)
           * WARNING: Could not find 'freetype2' headers in any
           * of 'win32_static\include', '.',
           * 'win32_static\include\freetype2', '.\freetype2'.

我在 python 中尝试过
import numpy

没有错误

但是当我尝试
import matplotlib

显示错误
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib

可能的解决方案是什么?

最佳答案

softpedia 不是 mpl 二进制文件的“官方”主机,请参阅 http://matplotlib.org/downloads.html

下载matplotlib来自 here并安装它。它包含了所有依赖项。

关于matplotlib - 无法安装 matplotlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16101289/

相关文章:

python - 使用 matplotlib 的热图

python - 在 scipy 中指定 pdist 的缺失值

python matplotlib 绘制日期时间索引

python - Matplotlib/Pyplot : How to zoom subplots together AND x-scroll separately?

python-2.7 - 带有 pyplot 的直方图中的垂直线

python - 按多列分组的值的线图

python - Matplotlib 直方图或 Seaborn distplot 的 bin 没有轮廓

python - 安装 pip 以导入模块

python - 带有 seaborn 的 Jointplot 多索引列

python - matplotlib - 使用 Python 和 numpy 绘制 2D map 数据