asm*_*mgx 2 windows bash qt spyder windows-subsystem-for-linux
我对 Linux 很陌生,我正在使用 Windows 11
从 MS 商店安装了 ubuntu bash 并使用此命令安装了 Spyder
sudo apt-get install spyder
Run Code Online (Sandbox Code Playgroud)
但是当我打电话给Spyder时
我收到这个错误
user1@DELLG3:~$ spyder
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aborted
Run Code Online (Sandbox Code Playgroud)
我尝试卸载并重新安装 Spyder
但同样的错误
知道如何解决这个问题吗?
默认情况下,WSL 没有X-server,因此您需要提供一个。有不同的 X 服务器可用于 Windows。最近我读到,在 Windows 11 上有一个名为WSLg的可用本机应用程序。
目前我使用的是 Windows 10,并且非常喜欢商店中提供的名为GWSL的第三方应用程序。
只需安装该应用程序并启动它。然后单击任务栏上的图标,浏览Linux 应用程序列表并找到您的程序 - 它应该是 Spider3。
请注意,在 Windows 10 上,如果尚未启用WSL2 ,则必须启用它,我认为在 Windows 11 上应该默认启用它。
此外,您可以在 WSL 本身下安装本机 X 服务器和整个桌面环境,然后设置 RDP 服务并使用 Windows 远程桌面应用程序登录 Ubuntu 的桌面环境。
在我看来,大多数情况下我们不需要这么复杂的解决方案。不过,这里有一个很好的视频教程,如何做到这一点,由 David Bombal 在 YouTube 上提供:WSL2 Ubuntu GUI
| 归档时间: |
|
| 查看次数: |
3383 次 |
| 最近记录: |