NixOS下无法使用PySide6:xcb平台插件加载失败求助
在NixOS(nixpkgs不稳定分支)上配置PySide6的xcb平台插件问题
我在使用nixpkgs不稳定分支的NixOS系统中,尝试通过nixpkgs、pip、conda三种方式安装PySide6后,均遇到相同的异常问题。
测试代码如下:
from PySide6.QtWidgets import QApplication, QWidget # Only needed for access to command line arguments import sys # You need one (and only one) QApplication instance per application. # Pass in sys.argv to allow command line arguments for your app. # If you know you won't use command line arguments QApplication([]) works too. app = QApplication(sys.argv) # Create a Qt widget, which will be our window. window = QWidget() window.show() # IMPORTANT!!!!! Windows are hidden by default. # Start the event loop. app.exec()
该代码本应打开一个示例窗口,但运行后出现如下错误:
$ python qt.py qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. 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: vnc, vkkhrdisplay, linuxfb, minimalegl, xcb, eglfs, offscreen, minimal, wayland, wayland-egl. Aborted (core dumped)
我已尝试安装nixpkgs中的xcb-util-cursor包,但问题仍未解决。请问有谁成功在NixOS上配置好PySide6?
内容的提问来源于stack exchange,提问作者lattitude
相关产品推荐
相关产品推荐

