Title: Install on Windows using pkg-config from conda · Issue #13016 · matplotlib/matplotlib · GitHub
Open Graph Title: Install on Windows using pkg-config from conda · Issue #13016 · matplotlib/matplotlib
X Title: Install on Windows using pkg-config from conda · Issue #13016 · matplotlib/matplotlib
Description: 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://
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/13016
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Install on Windows using pkg-config from conda","articleBody":"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.,\r\n```\r\npip install https://\u003csome-url\u003e/matplotlib.zip\r\n```\r\nwhere `matplotlib.zip` is the source distribution, taken e.g. from an open PR.\r\n\r\nAs 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,\r\n```\r\nconda install m2w64-pkg-config\r\n```\r\nsee https://github.com/conda-forge/pkg-config-feedstock/issues/11#issuecomment-292950444\r\nThis might help to detect the libpng/freetype libraries (I'm not fully sure), however in any case, install fails while linking libpng,\r\n\r\n\r\n```\r\n[...]\r\n REQUIRED DEPENDENCIES AND EXTENSIONS\r\n install_requires: yes [handled by setuptools]\r\n freetype: yes [Using unknown version found on system.]\r\n png: yes [Using unknown version found on system.]\r\n[...]\r\n\r\nC:\\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\r\n LINK : fatal error LNK1181: cannot open input file 'png.lib'\r\n error: command 'C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 14.0\\\\VC\\\\BIN\\\\x86_amd64\\\\link.exe' failed with exit status 1181\r\n```\r\nSee [detailed_log.txt](https://github.com/matplotlib/matplotlib/files/2691006/detailed_log.txt) for more details (this builds the https://github.com/matplotlib/matplotlib/pull/11577 PR)\r\n\r\n\r\nI'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. \r\n\r\nOpening this issue to track the usage of pkg-config on windows.\r\n\r\n### Versions\r\n\r\n * Operating system: Windows Server 2016 Datacenter\r\n * Matplotlib version: master branch\r\n * Python version: 3.7\r\n\r\nRelated: https://github.com/matplotlib/matplotlib/pull/9693","author":{"url":"https://github.com/rth","@type":"Person","name":"rth"},"datePublished":"2018-12-18T14:59:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/13016/matplotlib/issues/13016"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7b94a0e9-2182-23db-1815-56cd1b6e55ae |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 885E:3258B1:B644D2:F37A7F:6A52BA5F |
| html-safe-nonce | a4907dfa68349eddc3b699b19265ec5624287b7e9fb57a96e1d0c39d42fe9f48 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODVFOjMyNThCMTpCNjQ0RDI6RjM3QTdGOjZBNTJCQTVGIiwidmlzaXRvcl9pZCI6IjgxODM0NjE2NTM3MjM2OTUwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b2fa46db7ec988a0d65d907c2931a1ab64c1ab9d4695b84db50817bb398e598e |
| hovercard-subject-tag | issue:392194640 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/13016/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6575e0e16ca952d2250ae2dc763d12722f68feefe90b6d6e457b0bc33286e341/matplotlib/matplotlib/issues/13016 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6575e0e16ca952d2250ae2dc763d12722f68feefe90b6d6e457b0bc33286e341/matplotlib/matplotlib/issues/13016 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rth |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width