In order for the bare command leo to work, the operating system has to know 
that it's a Python file and that it's supposed to open a Python file using 
Python.  Sometimes this chain of identification doesn't get set up right.  
It seems like that was the problem when you got this error message:

leo : The term 'leo' is not recognized as the name of a cmdlet, function, 
script file, or operable program.

It will not get set up if you just download a zip file and run from it.  A 
pip install *may* do it, but I'm not sure.

I always run Leo directly, like this:

py38 -m launchLeo --use-docks
# or
py38 -m leo.core.runLeo --use-docs

Here, py38 is my installed Python 3.8 executable, which should have been 
put on your PATH by the pip installer.  Actually, though, I made a batch 
file for it to make sure the system could find it.  I did it this way 
because my system thinks that "python" is my Python 2.7 installation 
instead.

Using the -m option tells Python to run the module (e.g., launchLeo.py), as 
long as it is in a location known to Python.  For a pip install, Python can 
always find the module.  You don't need to have the system path set up 
correctly, and you don't need to remember where Leo is located.

So that's what I like to do.

On Sunday, April 19, 2020 at 1:45:23 PM UTC-4, Iohannes wrote:
>
> Dear Matt and Viktor, 
>
> thank you very much for your help. I have tried everything I could but 
> everything failed. Finally, I have decided to reinstall Python and the 
> recommended installation process by Matt went smoothly :). 
> So maybe there was something wrong with my Python.
>
> I have a couple of more question but I will make a separate post for them 
> :). I guess it is better to do in that way. 
>
> Thank you very much again, 
> best
> Jan
>
>
> On Sunday, 19 April 2020 18:22:11 UTC+2, Matt Wilkie wrote:
>>
>> Hello Jan,
>>
>> The most solid way is to install from sources (
>> https://leoeditor.com/installing.html#installing-leo-from-sources-all-platforms)
>>  
>> but unfortunately it's not the friendliest route for non-comandline folk.
>>
>> Overview:
>>
>> 1. Install python (v3.6+)
>> 2. Download Leo sources, and unpack somehwere convenient (e.g. 
>> c:\apps\leo-editor)
>> 3. Install with pip from a python enabled command prompt :
>> pip install --editable c:\apps\leo-editor
>> 4. Run leo.
>>
>> From your reported errors step 3 wasn't run or something went wrong with 
>> it (the dependent library PyQt5 wasn't installed, and probably others).
>>
>> Anaconda specific for Windows:
>>
>> *Start >> Anaconda Shell*, then:
>>
>> python --version
>> pip install --editable c:\apps\leo-editor
>> leo-messages
>>
>> The Pip install part will output a lot of messages. Generally the first 
>> and last 10 lines or so are most useful for troubleshooting.
>>
>> cheers,
>>
>> -matt
>>
>

-- 
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/abe5cd82-fb61-4e2c-a699-993d86104c71%40googlegroups.com.

Reply via email to