Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder cannot start in Wayland mode on Ubuntu 24.04 #22219

Open
parrenin opened this issue Jul 1, 2024 · 6 comments
Open

Spyder cannot start in Wayland mode on Ubuntu 24.04 #22219

parrenin opened this issue Jul 1, 2024 · 6 comments

Comments

@parrenin
Copy link

parrenin commented Jul 1, 2024

Problem Description

With a fresh install of Ubuntu and Anaconda, I cannot use Wayland with Spyder.
When launching:
QT_QPA_PLATFORM=wayland spyder
I get:
Could not find the Qt platform plugin "wayland" in ""
Even if I set the QT plugin path:
QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/ QT_QPA_PLATFORM=wayland spyder
I get:
Could not load the Qt platform plugin "wayland" in "" even though it was found.

What steps reproduce the problem?

  1. Install Anaconda on Ubuntu 24.04
  2. Try to launch spyder with Wayland
  3. => it does not work

What is the expected output? What do you see instead?

We should be able to use Spyder with Wayland support.

Versions

  • Spyder version: 5.5.1
  • Python version: 3.12
  • Qt version: 5.15
  • PyQt version: 5.15
  • Operating System name/version: Ubuntu 24.04
@ccordoba12
Copy link
Member

Hey @parrenin, thanks for reporting. I think Anaconda packages don't come with Wayland, so that's why you can't use Spyder with them.

However, you can use Conda-forge packages (a set of community-maintained packages), which include Wayland support for Qt. For that, please open a terminal and run the following commands:

conda create -n spyder-env -c conda-forge spyder python=3.12 qt-wayland
conda activate spyder-env
spyder

Let us know if it works for you.

@ccordoba12 ccordoba12 changed the title Cannot start in Wayland mode on Ubuntu 24.04 Spyder cannot start in Wayland mode on Ubuntu 24.04 Jul 3, 2024
@ccordoba12 ccordoba12 added this to the v6.0beta3 milestone Jul 3, 2024
@parrenin
Copy link
Author

parrenin commented Jul 3, 2024

Thanks @ccordoba12, it works with conda-forge!
This is especially useful when using fractional scaling on Linux.
Two small remarks:

  1. I still have to use QT_QPA_PLATFORME=wayland, so it seems wayland is still not default
  2. The pointer has a different shape compared to the standard Gnome pointer.

@ccordoba12
Copy link
Member

ccordoba12 commented Jul 3, 2024

I still have to use QT_QPA_PLATFORME=wayland, so it seems wayland is still not default

I understand that's a serious limitation, but we'll try to address it before the Spyder 6 release.

The pointer has a different shape compared to the standard Gnome pointer.

You can also install the qt-gtk-platformtheme package to see if it helps (but I'm not sure about that):

conda activate spyder-env
conda install -c conda-forge qt-gtk-platformtheme

@parrenin
Copy link
Author

parrenin commented Jul 3, 2024

I understand that's a serious limitation, but we'll try to address it before the Spyder 6 release.

Well, that is not a serious limitation once you have figured it out.

You can also install the qt-gtk-platformtheme package to see if it helps (but I'm not sure about that):

I did but it did not help.
BTW, not only is the pointer different, but it is also twice too big (I am using a 200% scaling in Gnome)

@parrenin
Copy link
Author

parrenin commented Jul 3, 2024

So it is like the pointer is scaled at 400% instead of at 200%.

@ccordoba12
Copy link
Member

Sorry, I have no idea how to fix that.

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

No branches or pull requests

2 participants