致命错误LNK1181:安装matplotlib == 3.0.3时无法打开输入文件'png.lib'

问题描述

我一直试图在conda环境中安装matplotlib == 3.0.3。我已经为C ++安装了MS Visual Build工具,并将rc.exe和rcdll.dll添加到了Microsoft Visual Studio 14.0中的bin文件夹中。请看看并帮助我。

AdvertiseCreateAPIView

解决方法

我希望您找到了一种解决方案,但如果没有,请使用以下解决方案: 根据matplot源代码here,在Windows上,您可能应该在某处创建z.lib和png.lib,然后将LINK环境变量设置为指向它们。

 If not using pkg-config (in particular on Windows),you may need to set the
   include path (to the FreeType,libpng,and zlib headers) and link path (to
   the FreeType,and zlib libraries) explicitly,if they are not in
   standard locations.  This can be done using standard environment variables
   and on Windows:

   .. code-block:: bat

      set CL=/IC:\directory\containing\ft2build.h ...
      set LINK=/LIBPATH:C:\directory\containing\freetype.lib ...

   where ``...`` means "also give,in the same format,the directories
   containing ``png.h`` and ``zlib.h`` for the include path,and for
   ``libpng.so``/``png.lib`` and ``libz.so``/``z.lib`` for the link path."