Trying to install Leo

106 views
Skip to first unread message

Joe Orr

unread,
Oct 26, 2019, 3:04:33 PM10/26/19
to leo-editor
I've been unable to spend time on Leo much this year. Hoping to get back into it soon.

Just got a new Mac and was unable to install Leo after 2 hours of trying.

This isn't surprising, I always have trouble installing it. On Windows I just use the 5.3 Quick Install, was never able to get it to work from source.

I am able to run Leo, it opens the default file. However, the menus don't work. Any ideas what the issue is?

I think the number one issue facing getting more users to use Leo is how hard it is to install. I think it is only really installable for python developers who already have all the dependencies. 

I installed Anaconda first, no luck. I didn't keep a log of all of the twists and turns of trying to install it. At one point I installed with pip and got errors, something about wrong version of Qt (my version is more recent).

I installed Qt separately, not clear if that is necessary. The Qt folder takes 22 GB. I'd like to delete that.

Version 6.0. 

Someone who knows the code needs to do a fresh install and find out what exactly is needed for an install and update the installation page. The Quick Install for Windows approach is best, in that case there isn't any "install SIP from sources" steps, you just download a folder and run. Leo is never going to see widespread adoption with this kind of installation procedure. 

-Joe Orr

Joe Orr

unread,
Oct 26, 2019, 4:54:30 PM10/26/19
to leo-editor
Update on this:

1. I deleted the 22GB Qt folder and leo still runs.
2. I found that the menus don't work when opening the program or clicking on pretty much anything, but if I close the macbook and open it again, they start to work.

Two issues:
1. The menus don't work - bug.
2. Installing is pretty much broken for anyone but Python programmers. 
   a. In recent years anytime I've had to install on Windows and tried the setup.exe install, it fails. Had to use the Quick Install of 5.3 from Sourceforge.
   b. Installing on Mac by following instructions on install page is not realistic for most users. For example, "pip install leo" doesn't work. (pip command doesn't work without setup, and then after installing pip more error messages).

Joe

Joe Orr

unread,
Oct 26, 2019, 4:56:13 PM10/26/19
to leo-editor
Another update on the menu bug: if I switch to another program and back, the menus work.

Joe

Matt Wilkie

unread,
Oct 26, 2019, 6:11:57 PM10/26/19
to leo-editor

Just got a new Mac and was unable to install Leo after 2 hours of trying.

Oh that's ugly. Ouch.

The most recent Mac install debugging effort has been here: https://github.com/leo-editor/leo-editor/issues/1288.

I think the successful install path will resemble:
  • install Anaconda (via miniconda, so it's light weight)
  • conda install python, pyqt5
  • download and unpack Leo source code
  • `pip install --editable path/to/code/leo-editor`
  • some monkeying around with PATH (see issue above, and linked discussions)
That's more involved than we'd like of course, but without Mac developers around it's the best we have at the moment.

I've no insight on the weird menu thing you describe.

-matt

Edward K. Ream

unread,
Oct 26, 2019, 6:32:03 PM10/26/19
to leo-editor
On Sat, Oct 26, 2019 at 5:11 PM Matt Wilkie <map...@gmail.com> wrote:

Just got a new Mac and was unable to install Leo after 2 hours of trying.

I think the successful install path will resemble:
  • install Anaconda (via miniconda, so it's light weight)
  • conda install python, pyqt5
  • download and unpack Leo source code
  • `pip install --editable path/to/code/leo-editor`
  • some monkeying around with PATH (see issue above, and linked discussions)
I agree.  Using Anaconda/miniconda is the key. The Jupyter project, used by millions of scientists, recommends Anaconda.

Edward

Joe Orr

unread,
Oct 27, 2019, 11:47:18 AM10/27/19
to leo-editor
I've been using Leo for more than 20 years so I know its value. Anyone else is going to have the reaction of the guy who wrote the negative note on Sourceforge. It is not reasonable to expect anyone to install this software unless they already know the software and are determined to install it.

Isn't it possible to make a something like the Quick Install package of 5.3 work on Mac? That is, just put all dependencies in a folder so nothing has to be installed?

Most professional developers in new tech firms use Macs. So this is an important demographic for getting the program more widely used. 

Also, maybe this is a dumb question but why doesn't the Linux Quick Install work on Mac? 

BTW, I also was unable to install on Windows last several times I did, had to use the Quick Install. When I have time I will do an install on a clean Windows machine and document issues to Github.

Joe

rengel

unread,
Oct 27, 2019, 12:45:02 PM10/27/19
to leo-editor
@matt

Today, I did a clean install of Anaconda.
Then I cloned leo-editor to my desktop (D:\bin\leo-editor)
But when I want to install Leo in Anconda following your steps, I get the following errors:

(base) C:\WINDOWS\system32>pip install --editable D:\bin\leo-editor
...
Requirement already satisfied: certifi>=2017.4.17 in d:\bin\python\anaconda\lib\site-packages (from requests>=2.5.0->sphinx->leo==6.1b1) (2019.9.11)
ERROR: spyder 3.3.6 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.13.1 which is incompatible.
ERROR: spyder 3.3.6 has requirement pyqtwebengine<5.13; python_version >= "3", but you'll have pyqtwebengine 5.13.1 which is incompatible.
Installing collected packages: PyQt5, PyQtWebEngine, appdirs, toml, black, dialite, webruntime, pscript, flexx, meta, leo, typed-ast
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Zugriff verweigert: 'D:\\bin\\python\\Anaconda\\Lib\\site-packages\\PyQt5\\QtCore.pyd'
Consider using the `--user` option or check the permissions.

Reinhard

PS: I did start the Anaconda console as a administrator.

Matt Wilkie

unread,
Oct 28, 2019, 12:33:56 AM10/28/19
to leo-editor
Thanks Reinhard. I've not tested on full Anaconda and from your report that shows.

You're installing from the (base) environment, which means anything you do in it is not isolated from the other possible python environments and apparently Leo and Spyder (which Anaconda ships with) ask for incompatible versions of PyQt.

Try this:

conda create --name leo-dev
activate leo
-dev
conda install pyqt5
pip install
--editable D:\bin\leo-editor
  • We create a new empty environment. It has nothing, not even python.
  • Then we activate it. Anything from this point forward happens in (leo) and not (base).
  • Install PyQt5 using Conda. This will also install python and a host of other required libraries.
  • Now we install Leo using python's pip package manager, which will fetch all of it's dependencies.
Let me know if this works.

-matt

Matt Wilkie

unread,
Oct 28, 2019, 1:06:18 AM10/28/19
to leo-editor
I've been using Leo for more than 20 years so I know its value. Anyone else is going to have the reaction of the guy who wrote the negative note on Sourceforge. It is not reasonable to expect anyone to install this software unless they already know the software and are determined to install it.

Yeah, it's not what people expect, or deserve. It was exactly this not-so-fun install experience which got me involved in Leo as more than a user. Barked shins and scratched hands fresh in mind motivated me to try do something about it. Much to my suprise and dismay, I'm still working on the same stuff years later!
 
Isn't it possible to make a something like the Quick Install package of 5.3 work on Mac? That is, just put all dependencies in a folder so nothing has to be installed?
Also, maybe this is a dumb question but why doesn't the Linux Quick Install work on Mac? 

Forgive my ignorance, but what do you mean by Quick Install? I don't see that in the docs at https://leoeditor.com/installing.html (but that might be because they've been changed in last couple days).
 
-matt

rengel

unread,
Oct 28, 2019, 4:02:47 AM10/28/19
to leo-e...@googlegroups.com
On Monday, October 28, 2019 at 5:33:56 AM UTC+1, Matt Wilkie wrote:
Thanks Reinhard. I've not tested on full Anaconda and from your report that shows.

conda create --name leo-dev
activate leo
-dev
conda install pyqt5
pip install
--editable D:\bin\leo-editor
  • We create a new empty environment. It has nothing, not even python.
  • Then we activate it. Anything from this point forward happens in (leo) and not (base).
  • Install PyQt5 using Conda. This will also install python and a host of other required libraries.
  • Now we install Leo using python's pip package manager, which will fetch all of it's dependencies.
Thanks for your fast response Matt! 

Basically, your suggestion worked (see the attached transcript of my installation; I used leo-editor instead of leo-dev).
My Leo installation is a fresh, unaltered clone from GitHub I made yesterday. It is stored in D:\bin\leo-editor.

I had problems with pyqt5 (don't know why), so I added conda-forge to the configuration and installed pyside2 from conda-forge.
After that, everthing worked fine.
As I'm not yet familiar with Anaconda, I had to try some variants to start Leo, until I realized that in Anaconda being in the environment (leo-editor, or leo-dev in your case) of an application doesn't mean to be in its home directory
(D:\bin\leo-editor).

Apart from that, the Leo installation is a little to cumbersome. It would be nice if Leo could be started with a one-button click.


 
install_transcript.txt

Matt Wilkie

unread,
Oct 29, 2019, 12:17:54 AM10/29/19
to leo-editor
thank you for the follow up report Reinhard. I'm glad something worked!

Under Settings menu there is a new item called "Desktop Integration". It contains scripts which will create Menu and Desktop shortcuts to launch Leo with a single click. They're not quite ready for widespread use, but might work for you. It's harmless to try; you might have to manually delete or modify some shortcuts that don't work. Tested most on Windows, works on some Linux, Mac I have no idea.

-matt

rengel

unread,
Oct 30, 2019, 8:16:50 AM10/30/19
to leo-editor
On Tuesday, October 29, 2019 at 5:17:54 AM UTC+1, Matt Wilkie wrote:
thank you for the follow up report Reinhard. I'm glad something worked!

Under Settings menu there is a new item called "Desktop Integration". It contains scripts which will create Menu and Desktop shortcuts to launch Leo with a single click. They're not quite ready for widespread use, but might work for you. It's harmless to try; you might have to manually delete or modify some shortcuts that don't work. Tested most on Windows, works on some Linux, Mac I have no idea.

Thanks!

Reinhard

Rob

unread,
Oct 30, 2019, 7:36:40 PM10/30/19
to leo-editor
Joe, Homebrew worked for me, but only after I completely deleted my old Homebrew usr directory and started over again. Then. make sure to use python3, otherwise the default python will try to take over (v2.7 I think). HTH

Rob...
Reply all
Reply to author
Forward
0 new messages