您的位置:首页 > 编程语言 > Python开发

windows下安装python库matplotlib

2017-02-14 13:54 288 查看
首先,本人只安装了标准版Python,在安装matplotlib时,遇到没有freetype和png的错误提示,经各种查找,最终在Stack Overflow上找到解决方法

http://stackoverflow.com/a/24534246/7561181

I was able to solve this on Windows by doing the following:
set INCLUDE=%INCLUDE%;C:\tmp\msvcr90-x32
set LIB=%LIB%;C:\tmp\msvcr90-x32
pip.exe install matplotlib


The link libraries for Freetype on windows can be found here:http://www.lfd
4000
.uci.edu/~gohlke/pythonlibs/#matplotlib (from
meawoppl's comment)

Just download the "matplotlib‑1.x‑windows‑link‑libraries.zip", and open the README from the zip.
网上资料查找还发现,如果安装了加强版的Python,或许就不会出现这种问题

如果你已经安装了python,你可能考虑使用加强版的python,如:Enthought
Python.它把scipy,numpy,wxpython以及一些有用的包都预安装了。使用加强版的python和matplotlib安装,下面这些后端都会轻松自动安装:agg, wx, wxagg, tkagg, ps, pdf和svg.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: