Hey all, I’m struggling to get either Pyside2 or 6 to work in replit (python bindings for QT - using bc of the flexible OSS license vs pyqt). I’ve been able to get it going fine on a mac with a virtualenv but have had troubles getting it to run in wsl2 and in replit (for separate reasons).
I’ve gone down the rabbit hole for adding packages to my replit.nix file and I’ve landed on this:
{ pkgs }: {
deps = [
pkgs.python310Full
pkgs.replitPackages.prybar-python310
pkgs.replitPackages.stderred
pkgs.libkrb5
pkgs.xorg.libxcb
pkgs.xorg.xcbutil
];
env = {
PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
# Needed for pandas / numpy
pkgs.stdenv.cc.cc.lib
pkgs.zlib
# Needed for pygame
pkgs.glib
# Needed for matplotlib
pkgs.xorg.libX11
pkgs.xorg.libxcb
pkgs.xorg.xcbutil
pkgs.libkrb5
];
PYTHONHOME = "${pkgs.python310Full}";
PYTHONBIN = "${pkgs.python310Full}/bin/python3.10";
LANG = "en_US.UTF-8";
STDERREDBIN = "${pkgs.replitPackages.stderred}/bin/stderred";
PRYBAR_PYTHON_BIN = "${pkgs.replitPackages.prybar-python310}/bin/prybar-python310";
};
}
But unfortunately once I’m here I get the following unfortunate error (with a bunch of logs that I’m omitting bc they are relatively incomprehensible exiting with status 2 at the end):
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
I’ve tried adding mesa and libgl as well in the past to no avail. I’m sort of stuck. I’ve looked at this post in the past and the advise there isn’t satisfactory for this issue.
Would love some help!