After my last post, I found the fix for the "xcb" problem with PyQt5. It was in a discussion thread from several years ago, and I haven't verified that it still works (but I suspect it does):
sudo apt-get install libxcb-xinerama0 On Sunday, May 7, 2023 at 10:44:46 AM UTC-4 Thomas Passin wrote: > I created a new Ubuntu VM with 22.04.2. To install the "guest additions" > so that the Ubuntu window could be resized ot something useful, I had to run > > sudo apt-get install gcc make perl > > I installed pip with > > sudo apt install python3-pip > > Then I installed Leo from PyPi: > > python3 -m pip install --user leo > > Leo failed to run: > > python3 -m leo.core.runLeo > > The error message included a line I've seen before: > > qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even > though it was found. > > I remembered that I've encountered this before and solved it by installing > a .so library. It's some kind of a packaging error by Ubuntu. I couldn't > find any notes about doing so, so I searched the internet, but the > best-looking solution I tried didn't fix the problem. > > Rather than spend more time, I just installed PyQt6 and after this Leo > runs: > > python3 -m pip install --user pyqt6 > > To get the viewrendered3 plugin to work, you will also need to install the > WebEngine for PyQt6: > > python3 -m install --user PyQt6-WebEngine > > > On Sunday, May 7, 2023 at 8:35:50 AM UTC-4 Thomas Passin wrote: > >> Someone else recently had problems on Ubuntu 22 LTS. Look at this >> discussion here on the Groups site: >> >> Install Problems on Ubuntu 22 >> <https://groups.google.com/g/leo-editor/c/hzk0zlSv5BY> >> >> The OP never said how or if Leo finally got to work, so I've been hoping >> some of the suggestions helped. >> >> In general, I have provisioned a lot of Linux VMs with Leo, including >> Ubuntu 22, with success. Sometimes a shared library is missing - I mean a >> .so file, not a Python library. Once or twice, IIRC, I had to install Qt >> itself, beyond PyQt, to get all the necessary parts. But I don't remember >> all the details or even which Linux distro was involved. >> >> In your case, beyond suggestions on the other thread, I'd probably try to >> use the package manager to install Qt (it may already be present because >> some other program uses it, but maybe not). Some desktop managers >> themselves use Qt, some do not. You can probably find out about Ubuntu's >> with some internet searching. >> >> On my own Ubuntu 22.04 VM (which Leo works on), a search for directories >> starting with "Qt" gave this: >> >> tom@tom-ubuntu-VirtualBox:~$ find / -type d -name Qt 2>/dev/null >> /usr/lib/python3/dist-packages/orca/scripts/toolkits/Qt >> /home/tom/.local/lib/python3.10/site-packages/PyQt5/Qt5/qml/Qt >> /home/tom/.local/lib/python3.8/site-packages/PyQt5/Qt >> /home/tom/.local/lib/python3.8/site-packages/PyQt5/Qt/qml/Qt >> /home/tom/.local/lib/python3.8/site-packages/PyQt5/Qt5/qml/Qt >> >> Don't forget the 2>/dev/null or the output will be dominated by zillions >> of "permission denied" messages! >> On Sunday, May 7, 2023 at 7:32:28 AM UTC-4 [email protected] wrote: >> >>> Hi there, >>> >>> I'm getting back to Leo after some years away. However, the installation >>> is failing on my Ubuntu 22.04LTS system. >>> >>> I carefully followed the instructions for git install, and the pip step >>> installed quite a few other packages, some of which mentioned PyQt. >>> >>> But when I ran 'leo', what I got was: >>> >>> *'NoneType' object has no attribute 'gui'* >>> >>> I then ran 'pip uninstall leo' in an attempt to clean it out, then 'pip >>> install leo' to follow the pip installation method. >>> >>> Again, when running leo, the same error. >>> >>> Any suggestions? >>> >>> Cheers >>> David >>> >>> -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/5bab5442-b8a5-4a7d-8364-ba49df45121bn%40googlegroups.com.
