Does PyQt5 work in replit at all?

I have gotten into the details of the wrong module being imported in another thread, but after playing around with basic implementations of pyqt test scripts, i realize I just always get major import errors for missing dependencies with pyqt5, like nix OS just can’t find anything, this has happened with about six different dependencies. Then I will go and install for instance GCC and Mesa, and it does nothing, nothing changes, it still never can find the missing library. Granted I was trying to get it to render to xvfb and a virtual screen, I’m aware replit can’t run OpenGL persay as a vm. But I can’t even get past the dependency circular problem.

So this isn’t the code persay, I can’t even get a hello world button or hello world print statement to work.

I’ve tried getting it to work but got stuck after the window in the Output was not updating even though it was there.

You can indeed install it. You have to use the nix package "pkgs.python310Packages.pyqt6, and this won’t require any other dependencies. (You can swap out the 6 for a 5 or 4.)

Here’s the repl, play around with it and if you get it to work, let me know:
https://replit.com/@NuclearPasta0/PyQt6

Related:

3 Likes

"qt.qpa.plugin: Could not find the Qt platform plugin “xcb” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
" very peculiar it does work for pyqt6, it breaks for pyqt5 when i change it