I could use some help here.
I’ve been trying to run CQ-editor, a viewer for CAD models created by CadQuery. CQ-editor and CadQuery are both installed through Anaconda.
My window manager is Sway on Wayland. Other QT applications (eg. OpenSCAD) run fine in my regular user environment. But when I try to run CQ-editor (through my Conda environment) I get the error:
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, xcb.
Reinstalling the application may fix this problem.
Aborted
That empty string at the end of the first line does look suspcious. I’ve been able to change it by setting the environment variable QT_QPA_PLATFORM_PLUGIN_PATH
, but every path I’ve tried has produced the same error message. I’ve tried /home/marcus/.conda/plugins
, /home/marcus/.nix-profile/lib/qt-5.12/plugins/platforms
and a few others. They all have libqxcb.so
in them (which I assume is what QT is looking for).
I’ll describe my setup here. I include some extra packages in my Conda environment using an overlay, conda = super.conda.override { extraPkgs = [ super.libGL super.libGLU super.xorg.libX11 super.qt5 super.libsForQt5 super.strace ]; };
Conda is installed using home-manager home.packages.
To get CQ-editor installed my process is:
rm -rf ~/.conda
nixos-rebuild switch
conda-shell-4.3.31
conda-install
conda install -c cadquery -c conda-forge cq-editor cadquery=2
QT_QPA_PLATFORM= cq-editor
I have confirmed the Conda shell is working properly for CadQuery; I can start a python3 interpreter, load the CadQuery module and render a basic box to a SVG. Which I find pretty impressive actually, kudos to whoever wrote that Conda environment, I was expecting hours of messing around in order to get an Anaconda package working under NixOS.
Has anyone got any advice where I should go from here to get CQ-editor working?