Skip to content

matplotlib fails to install under Windows on GraalPy 25.0.0 #544

Open

Description

@s5bug
> pip install matplotlib
C:\Users\Aly\.pyenv\pyenv-win\versions\graalpy-25.0.0-windows-amd64\Lib\ssl.py:527: UserWarning: unable to enumerate Windows certificate store
  warnings.warn("unable to enumerate Windows certificate store")
WARNING: Disabling truststore because platform isn't supported
Looking in indexes: https://pypi.org/simple, https://www.graalvm.org/python/wheels/
Collecting matplotlib
  Downloading matplotlib-3.10.6.tar.gz (34.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.8/34.8 MB 13.3 MB/s eta 0:00:00
  Looking for GraalPy patches for matplotlib
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 2
  ╰─> [17 lines of output]
      + meson setup C:\Users\Aly\AppData\Local\Temp\pip-install-7p4n0793\matplotlib_37da3d368e7447a48e643f1eb3f1aa70 C:\Users\Aly\AppData\Local\Temp\pip-install-7p4n0793\matplotlib_37da3d368e7447a48e643f1eb3f1aa70\.mesonpy-bn__bqvo -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Aly\AppData\Local\Temp\pip-install-7p4n0793\matplotlib_37da3d368e7447a48e643f1eb3f1aa70\.mesonpy-bn__bqvo\meson-python-native-file.ini
      Traceback (most recent call last):
        File "C:\Users\Aly\AppData\Local\Temp\pip-build-env-069mgoq7\overlay\Lib\site-packages\mesonbuild\mesonmain.py", line 193, in run
          return options.run_func(options)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Aly\AppData\Local\Temp\pip-build-env-069mgoq7\overlay\Lib\site-packages\mesonbuild\msetup.py", line 394, in run
          app.generate()
        File "C:\Users\Aly\AppData\Local\Temp\pip-build-env-069mgoq7\overlay\Lib\site-packages\mesonbuild\msetup.py", line 190, in generate
          with mesonlib.DirectoryLock(self.build_dir, 'meson-private/meson.lock',
        File "C:\Users\Aly\AppData\Local\Temp\pip-build-env-069mgoq7\overlay\Lib\site-packages\mesonbuild\utils\win32.py", line 22, in __enter__
          mode = msvcrt.LK_LOCK
                 ^^^^^^^^^^^^^^
      AttributeError: module 'msvcrt' has no attribute 'LK_LOCK'

      ERROR: Unhandled python exception

          This is a Meson bug and should be reported!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Notably, the MSVCRT builtins file of GraalPy has a comment saying that it's only there to make Meson work.

Activity

  1. self-assigned this
    on Sep 19, 2025
  2. msimacek commented on Sep 19, 2025

    @msimacek
    Contributor

    Thanks for the report, I'll add the missing constant

  3. msimacek commented on Sep 19, 2025

    @msimacek
    Contributor

    I made a PR for the msvcrt stuff, which is enough to build matplotlib. But I couldn't build kiwisolver (a runtime dependency of matplotlib). I'm going on a vacation for a few weeks, I'll look into that after I'm back

  4. added a commit that references this issue on Sep 22, 2025
  5. kgonia commented on Dec 9, 2025

    @kgonia

    I created PR in kiwisolver with graalpy 25 support. If accepted wheels for windows will be available. nucleic/kiwi#205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions