-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ENH]: WSL support #32381
Copy link
Copy link
Open
Labels
Documentation: user guidefiles in galleries/users_explain or doc/usersfiles in galleries/users_explain or doc/usersfirst-contribution
Description
Activity
Metadata
Metadata
Assignees
Labels
Documentation: user guidefiles in galleries/users_explain or doc/usersfiles in galleries/users_explain or doc/usersfirst-contribution
Problem
Actually it is not user-friendly to run Matplotlib on WSL.
Moreover, this answer python - Show matplotlib plots (and other GUI) in Ubuntu (WSL1 & WSL2) - Stack Overflow is outdated.
Since WSL2 implements the Wayland protocol and the OpenGL API, Matplolib should detect it is running on WSL and select automatically the right backend or raises an informative error message.
To detect WSL, we can rely on:
unamekernel/etc/wsl-distribution.confFor the backend, we can use:
QT_QPA_PLATFORM=wayland(PySide2 seems to crash)QT_QPA_PLATFORMis mandatory since Qt is probably not able to detect WSL and select the right backend.RESUME for USERS: YOU DON'T NEED X11 ! It should work out of the box !
Proposed solution
No response