I wonder why...

33 views
Skip to first unread message

Félix

unread,
Sep 11, 2022, 8:06:58 PM9/11/22
to leo-editor
(I installed python 3.9, to use the  latest Leo - and PyQt5 as per the official doc on Leo'S website about it being the only dependency https://leoeditor.com/installing.html#dependencies )

After frustrating lack of success ('Nonetype' has no attribute 'gui' check your dependencies at the url above message)

I had to start the old leo (6.4 master branch) at least once with my new python3.9, before being able to start the new leo (6.7 devel branch) by magic! 

and is says in the log pane that it's useing pyqt6 ! 

This is surprising, ... it works, but I mean ... All the python ecosystem is a complete mystery to me!  lol 

Félix

Thomas Passin

unread,
Sep 11, 2022, 10:58:34 PM9/11/22
to leo-editor
I see that the linked page with dependencies still says that Leo can run using Python 3.6.  But when I tried to run it using Python3.7, it wouldn't run and gave a message that 3.9 or higher is required.

The language should be updated for the 6.7 branch, I think.

Thomas Passin

unread,
Sep 11, 2022, 11:03:52 PM9/11/22
to leo-editor
If you want to try using PyQt5, you can pip-install it by hand. Here's how I get Leo to use PyQt5 instead of PyQt6;  I think it's the easiest way to do it.  I navigate to Lib/site-packages and find the PyQt5 and PyQt6 directories.  I just rename the PyQt6 directory to something else, usually PyQt6x.  Then Leo won't be able to import it and should fall back to using PyQy5.  When you are satisfied that Leo works with PyQt5, just rename PyQt6x back to PyQt6 and restart Leo.

On Sunday, September 11, 2022 at 8:06:58 PM UTC-4 Félix wrote:

Edward K. Ream

unread,
Sep 12, 2022, 2:49:23 AM9/12/22
to leo-editor
On Sun, Sep 11, 2022 at 7:07 PM Félix <felix...@gmail.com> wrote:
(I installed python 3.9, to use the  latest Leo - and PyQt5 as per the official doc on Leo'S website about it being the only dependency https://leoeditor.com/installing.html#dependencies )

Thanks for this bug report :-) Leo's installation page should:

- Make PyQt6 the requirement. PyQt5 is ancient history now.
- Say that Python 3.9 or later is required.

Thomas is correct. The best way to install dependencies is with pip.

Edward

Edward K. Ream

unread,
Sep 12, 2022, 2:51:01 AM9/12/22
to leo-editor
On Sun, Sep 11, 2022 at 10:03 PM Thomas Passin <tbp1...@gmail.com> wrote:
If you want to try using PyQt5, you can pip-install it by hand. Here's how I get Leo to use PyQt5 instead of PyQt6;  I think it's the easiest way to do it.  I navigate to Lib/site-packages and find the PyQt5 and PyQt6 directories.  I just rename the PyQt6 directory to something else, usually PyQt6x.  Then Leo won't be able to import it and should fall back to using PyQy5.  When you are satisfied that Leo works with PyQt5, just rename PyQt6x back to PyQt6 and restart Leo.

I don't recommend hacks like this.  Use pip uninstall to uninstall pyqt5 or pyqt6.

Edward
Reply all
Reply to author
Forward
0 new messages