Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Install on Windows using pkg-config from conda #13016

Copy link
Copy link
Closed
@rth

Description

@rth
Issue body actions

The current way of installing from sources on Windows involves running the build_alllocal.cmd script which manually copies libz and libpng to the right location. Such approach doesn't work with e.g.,

pip install https://<some-url>/matplotlib.zip

where matplotlib.zip is the source distribution, taken e.g. from an open PR.

As far as I understand, on Linux this is solved by using pkg-config. On Windows, pkg-config can also be installed from the msys2 channel which is now parts of the default channel, as,

conda install m2w64-pkg-config

see conda-forge/pkg-config-feedstock#11 (comment)
This might help to detect the libpng/freetype libraries (I'm not fully sure), however in any case, install fails while linking libpng,

[...]
  REQUIRED DEPENDENCIES AND EXTENSIONS
    install_requires: yes [handled by setuptools]
            freetype: yes [Using unknown version found on system.]
                 png: yes [Using unknown version found on system.]
[...]

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ProgramData\Miniconda3\envs\laserbeam-env\Library\lib /LIBPATH:C:\ProgramData\Miniconda3\envs\laserbeam-env\libs /LIBPATH:C:\ProgramData\Miniconda3\envs\laserbeam-env\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" png.lib z.lib /EXPORT:PyInit__png build\temp.win-amd64-3.7\Release\src/_png.obj build\temp.win-amd64-3.7\Release\src/mplutils.obj /OUT:build\lib.win-amd64-3.7\matplotlib\_png.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\_png.cp37-win_amd64.lib
    LINK : fatal error LNK1181: cannot open input file 'png.lib'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1181

See detailed_log.txt for more details (this builds the #11577 PR)

I'm wondering if this has anything to do with the fact that PkgConfig.has_pkgconfig is hardcoded to False in setupext.py when on Windows.

Opening this issue to track the usage of pkg-config on windows.

Versions

  • Operating system: Windows Server 2016 Datacenter
  • Matplotlib version: master branch
  • Python version: 3.7

Related: #9693

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.