Re: Leo from GitHub in a PyVE on Debian ?

2024-05-16 Thread Thomas Passin

On Thursday, May 16, 2024 at 5:24:27 AM UTC-4 viktor@gmail.com wrote:

Hello Thomas,

tbp1...@gmail.com schrieb am Donnerstag, 16. Mai 2024 um 03:30:52 UTC+2:

The PR has been merged into the devel branch.  Update your clone repo and 
you should be good to go.

 
Thanks a lot, your PR has resolved the issue !

I double-checked WHY [pychant was present]- and - found out that it is part 
of Leo's required packages - See

* https://github.com/leo-editor/leo-editor/blob/devel/requirements.txt


Yes, that's right.  What I *think* I remember is that on some systems 
pyenchant wouldn't work when installed with pip.  In those cases, 
installing the system's package (e.g., python3-enchant) solved the problem.
 

Once again : Thanks a lot for resolving this issue !


: ) 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/4787543a-a9a9-4816-a89e-c05ff0fa4fd6n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-16 Thread Viktor Ransmayr
Hello Thomas,

tbp1...@gmail.com schrieb am Donnerstag, 16. Mai 2024 um 03:30:52 UTC+2:

The PR has been merged into the devel branch.  Update your clone repo and 
you should be good to go.

 
Thanks a lot, your PR has resolved the issue !
 

There is a possibility that on some Linux systems you have to install  
*python3-enchant* using operating system installer.  Debian is one of them, 
I think.  So (untested) on debian-based distros:

sudo apt-get install python3-enchant


This was not necessary for my PyVE of Leo's GitHub version ...
 

The reason is that on Windows the binary files needed are included in the 
PyPi install of pyenchant, but on Linux you have to install a system .so 
library and get it hooked up to the Python code.  The system's package does 
all that.  There's probably something similar for non-Debian-based distros.
On Wednesday, May 15, 2024 at 6:52:48 PM UTC-4 Thomas Passin wrote:

I just created a PR to fix this bug.

On Wednesday, May 15, 2024 at 6:33:36 PM UTC-4 Thomas Passin wrote:

I'm getting a better idea of what may be going on.  Leo's spell checker 
tries to load the pyenchant module (which contains a speller and some word 
dictionaries). If that is not available, then the code branches to the code 
with the bug.  On Linux, in this condition, Leo did open its GUI window but 
it was very small.  When I expanded it an empty outline was displayed, 
although it was called "workbook".

When I fixed the bug by deleting the ".d", and made sure that enchant was 
not available, then Leo opened normally, although it did not have a 
spell-checking tab, which makes sense.

Perhaps pyenchant is not available for the Mac Python distribution?  It can 
be checked for by by activating your venv and issuing the command

python3 -m pip list |grep "pyenchant".


It was already available - See log below: 

user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ python3 -m pip list | 
grep "pyenchant"
pyenchant 3.2.2
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 

I double-checked WHY - and - found out that it is part of Leo's required 
packages - See

* https://github.com/leo-editor/leo-editor/blob/devel/requirements.txt
 

If it's listed then open a Python interpreter session and try to import it:

import enchant  # Not a typo - right name is "enchant", not "pyenchant"

If it's not there, you can search on line to see if it can be obtained for 
the Mac.  In the meantime you can get Leo working right by finding the 
python file named in the error message, finding that line, and deleting the 
characters ".d".  Save the file.  Leo should then run correctly.


On Wednesday, May 15, 2024 at 5:34:11 PM UTC-4 Thomas Passin wrote:



AttributeError: 'DefaultDict' object has no attribute 'd'


Funny, that looks like a bug in the devel branch that was fixed already. 


Once again : Thanks a lot for resolving this issue !

With kind regards,

Viktor
 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c239baa3-e6f0-42bb-909c-b187ea598365n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Thomas Passin
The PR has been merged into the devel branch.  Update your clone repo and 
you should be good to go.

There is a possibility that on some Linux systems you have to install  
*python3-enchant* using operating system installer.  Debian is one of them, 
I think.  So (untested) on debian-based distros:

sudo apt-get install python3-enchant

The reason is that on Windows the binary files needed are included in the 
PyPi install of pyenchant, but on Linux you have to install a system .so 
library and get it hooked up to the Python code.  The system's package does 
all that.  There's probably something similar for non-Debian-based distros.
On Wednesday, May 15, 2024 at 6:52:48 PM UTC-4 Thomas Passin wrote:

> I just created a PR to fix this bug.
>
> On Wednesday, May 15, 2024 at 6:33:36 PM UTC-4 Thomas Passin wrote:
>
>> I'm getting a better idea of what may be going on.  Leo's spell checker 
>> tries to load the pyenchant module (which contains a speller and some word 
>> dictionaries). If that is not available, then the code branches to the code 
>> with the bug.  On Linux, in this condition, Leo did open its GUI window but 
>> it was very small.  When I expanded it an empty outline was displayed, 
>> although it was called "workbook".
>>
>> When I fixed the bug by deleting the ".d", and made sure that enchant was 
>> not available, then Leo opened normally, although it did not have a 
>> spell-checking tab, which makes sense.
>>
>> Perhaps pyenchant is not available for the Mac Python distribution?  It 
>> can be checked for by by activating your venv and issuing the command
>>
>> python3 -m pip list |grep "pyenchant".
>>
>> If it's listed then open a Python interpreter session and try to import 
>> it:
>>
>> import enchant  # Not a typo - right name is "enchant", not "pyenchant"
>>
>> If it's not there, you can search on line to see if it can be obtained 
>> for the Mac.  In the meantime you can get Leo working right by finding the 
>> python file named in the error message, finding that line, and deleting the 
>> characters ".d".  Save the file.  Leo should then run correctly.
>>
>>
>> On Wednesday, May 15, 2024 at 5:34:11 PM UTC-4 Thomas Passin wrote:
>>
>>
>>
>> AttributeError: 'DefaultDict' object has no attribute 'd'
>>
>>
>> Funny, that looks like a bug in the devel branch that was fixed already. 
>>
>>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/640af0a7-fcc5-42a7-8a96-99f4766fe958n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Thomas Passin
I just created a PR to fix this bug.

On Wednesday, May 15, 2024 at 6:33:36 PM UTC-4 Thomas Passin wrote:

> I'm getting a better idea of what may be going on.  Leo's spell checker 
> tries to load the pyenchant module (which contains a speller and some word 
> dictionaries). If that is not available, then the code branches to the code 
> with the bug.  On Linux, in this condition, Leo did open its GUI window but 
> it was very small.  When I expanded it an empty outline was displayed, 
> although it was called "workbook".
>
> When I fixed the bug by deleting the ".d", and made sure that enchant was 
> not available, then Leo opened normally, although it did not have a 
> spell-checking tab, which makes sense.
>
> Perhaps pyenchant is not available for the Mac Python distribution?  It 
> can be checked for by by activating your venv and issuing the command
>
> python3 -m pip list |grep "pyenchant".
>
> If it's listed then open a Python interpreter session and try to import it:
>
> import enchant  # Not a typo - right name is "enchant", not "pyenchant"
>
> If it's not there, you can search on line to see if it can be obtained for 
> the Mac.  In the meantime you can get Leo working right by finding the 
> python file named in the error message, finding that line, and deleting the 
> characters ".d".  Save the file.  Leo should then run correctly.
>
>
> On Wednesday, May 15, 2024 at 5:34:11 PM UTC-4 Thomas Passin wrote:
>
>
>
> AttributeError: 'DefaultDict' object has no attribute 'd'
>
>
> Funny, that looks like a bug in the devel branch that was fixed already. 
>
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8d6a26f3-af03-4904-8580-5127fcab2651n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Thomas Passin
I'm getting a better idea of what may be going on.  Leo's spell checker 
tries to load the pyenchant module (which contains a speller and some word 
dictionaries). If that is not available, then the code branches to the code 
with the bug.  On Linux, in this condition, Leo did open its GUI window but 
it was very small.  When I expanded it an empty outline was displayed, 
although it was called "workbook".

When I fixed the bug by deleting the ".d", and made sure that enchant was 
not available, then Leo opened normally, although it did not have a 
spell-checking tab, which makes sense.

Perhaps pyenchant is not available for the Mac Python distribution?  It can 
be checked for by by activating your venv and issuing the command

python3 -m pip list |grep "pyenchant".

If it's listed then open a Python interpreter session and try to import it:

import enchant  # Not a typo - right name is "enchant", not "pyenchant"

If it's not there, you can search on line to see if it can be obtained for 
the Mac.  In the meantime you can get Leo working right by finding the 
python file named in the error message, finding that line, and deleting the 
characters ".d".  Save the file.  Leo should then run correctly.

On Wednesday, May 15, 2024 at 5:34:11 PM UTC-4 Thomas Passin wrote:



AttributeError: 'DefaultDict' object has no attribute 'd'


Funny, that looks like a bug in the devel branch that was fixed already. 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/005de986-1be0-444b-a5e4-a62a2c602796n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Thomas Passin
On my system, this version has the same line, but the line isn't getting 
called at startup.  Looking at the code that creates a DefaultDict, I don't 
see that it should have an attribute "d".  I suspect that the line should be

g.app.spellDict = DefaultDict()  # 2024/04/09: bug fix.

I can't test that because it's not getting called on my system.  I'm 
surprised that this failure can keep Leo from operating...


On Wednesday, May 15, 2024 at 3:16:23 PM UTC-4 viktor@gmail.com wrote:

> Hello Thomas,
>
> tbp1...@gmail.com schrieb am Mittwoch, 15. Mai 2024 um 20:57:02 UTC+2:
>
> On Wednesday, May 15, 2024 at 2:33:08 PM UTC-4 viktor@gmail.com wrote:
>
> Hello Thomas,
> [snip]
>
>
>   File 
> "/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line 
> 185, in __init__
> g.app.spellDict = DefaultDict().d  # 2024/04/09: bug fix.
>   ^^^
>
> AttributeError: 'DefaultDict' object has no attribute 'd'
>
>
> Funny, that looks like a bug in the devel branch that was fixed already. 
>
> Strange, but the version of the devel branch you are running is not the 
> current one, and I can't even find yours on Github.  The current commit 
> is eef303a2d0fc1e41634376058fa5ace2ac9fad95.  Try updating your clone, or 
> downloading a zip of the current version of the devel branch and using that 
> one.
>
>
> I did what you said - but - no change : -( - See log !
>
> I'll call it a day for now - and - will restart tomorrow morning ...
>
> With kind regards,
>
> Viktor
>
> ### New Log
>
>  user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
> user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
> user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ git branch
> * devel
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ git pull
> remote: Enumerating objects: 88, done.
> remote: Counting objects: 100% (76/76), done.
> remote: Compressing objects: 100% (19/19), done.
> remote: Total 50 (delta 44), reused 37 (delta 31), pack-reused 0
> Unpacking objects: 100% (50/50), 5.44 KiB | 67.00 KiB/s, done.
> From https://github.com/leo-editor/leo-editor
>fb85027ea..eef303a2d  devel-> origin/devel
>18f9164ec..01d9dda87  ekr-3871-search-settings -> 
> origin/ekr-3871-search-settings
>  * [new branch]  ekr-3910-no-fl-ns-plugins -> 
> origin/ekr-3910-no-fl-ns-plugins
>  * [new branch]  ekr-3912-MacOs-crash -> 
> origin/ekr-3912-MacOs-crash
>fb85027ea..eef303a2d  gh-pages -> origin/gh-pages
> Updating fb85027ea..eef303a2d
> Fast-forward
>  leo/config/leoSettings.leo |   2 +-
>  leo/core/leoCache.py   |  28 +-
>  leo/core/leoFileCommands.py|   4 -
>  leo/core/leoFrame.py   |   4 +-
>  leo/core/leoTokens.py  |  11 +-
>  leo/doc/leoAttic.txt   | 115 ++
>  leo/plugins/free_layout.py |  33 +-
>  leo/plugins/nested_splitter.py |   8 +-
>  leo/plugins/qt_frame.py|   2 +-
>  leo/plugins/viewrendered.py| 837 
> +++--
>  10 files changed, 550 insertions(+), 494 deletions(-)
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 
> -m leo.core.runLeo --version
> Leo 6.7.9-devel, devel branch, build eef303a2d0
> 2024-05-14 07:59:14 -0500
> Python 3.11.2
> linux
>
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 
> -m leo.core.runLeo
> setting leoID from os.getenv('USER'): 'user'
> Leo 6.7.9-devel, devel branch, build eef303a2d0
> 2024-05-14 07:59:14 -0500
>
> Python 3.11.2, PyQt version 6.7.0
> linux
> Can not load session
> Traceback (most recent call last):
>
>   File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", 
> line 2307, in doPostPluginsInit
> g.app.sessionManager.load_session(c1, aList)
>
>   File 
> "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoSessions.py", line 72, 
> in load_session
> g.openWithFileName(fn, gui=g.app.gui, old_c=c)
>
>   File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoGlobals.py", 
> line 3238, in openWithFileName
> return g.app.loadManager.openWithFileName(fileName, gui, old_c)
>
>
>   File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", 
> line 3010, in openWithFileName
> return lm.openExisti

Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Viktor Ransmayr
Hello Thomas,

tbp1...@gmail.com schrieb am Mittwoch, 15. Mai 2024 um 20:57:02 UTC+2:

On Wednesday, May 15, 2024 at 2:33:08 PM UTC-4 viktor@gmail.com wrote:

Hello Thomas,
[snip]


  File 
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line 
185, in __init__
g.app.spellDict = DefaultDict().d  # 2024/04/09: bug fix.
  ^^^

AttributeError: 'DefaultDict' object has no attribute 'd'


Funny, that looks like a bug in the devel branch that was fixed already. 

Strange, but the version of the devel branch you are running is not the 
current one, and I can't even find yours on Github.  The current commit 
is eef303a2d0fc1e41634376058fa5ace2ac9fad95.  Try updating your clone, or 
downloading a zip of the current version of the devel branch and using that 
one.


I did what you said - but - no change : -( - See log !

I'll call it a day for now - and - will restart tomorrow morning ...

With kind regards,

Viktor

### New Log

 user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ git branch
* devel
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ git pull
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (76/76), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 50 (delta 44), reused 37 (delta 31), pack-reused 0
Unpacking objects: 100% (50/50), 5.44 KiB | 67.00 KiB/s, done.
From https://github.com/leo-editor/leo-editor
   fb85027ea..eef303a2d  devel-> origin/devel
   18f9164ec..01d9dda87  ekr-3871-search-settings -> 
origin/ekr-3871-search-settings
 * [new branch]  ekr-3910-no-fl-ns-plugins -> 
origin/ekr-3910-no-fl-ns-plugins
 * [new branch]  ekr-3912-MacOs-crash -> 
origin/ekr-3912-MacOs-crash
   fb85027ea..eef303a2d  gh-pages -> origin/gh-pages
Updating fb85027ea..eef303a2d
Fast-forward
 leo/config/leoSettings.leo |   2 +-
 leo/core/leoCache.py   |  28 +-
 leo/core/leoFileCommands.py|   4 -
 leo/core/leoFrame.py   |   4 +-
 leo/core/leoTokens.py  |  11 +-
 leo/doc/leoAttic.txt   | 115 ++
 leo/plugins/free_layout.py |  33 +-
 leo/plugins/nested_splitter.py |   8 +-
 leo/plugins/qt_frame.py|   2 +-
 leo/plugins/viewrendered.py| 837 
+++--
 10 files changed, 550 insertions(+), 494 deletions(-)
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
leo.core.runLeo --version
Leo 6.7.9-devel, devel branch, build eef303a2d0
2024-05-14 07:59:14 -0500
Python 3.11.2
linux
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
leo.core.runLeo
setting leoID from os.getenv('USER'): 'user'
Leo 6.7.9-devel, devel branch, build eef303a2d0
2024-05-14 07:59:14 -0500
Python 3.11.2, PyQt version 6.7.0
linux
Can not load session
Traceback (most recent call last):

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line 
2307, in doPostPluginsInit
g.app.sessionManager.load_session(c1, aList)

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoSessions.py", 
line 72, in load_session
g.openWithFileName(fn, gui=g.app.gui, old_c=c)

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoGlobals.py", 
line 3238, in openWithFileName
return g.app.loadManager.openWithFileName(fileName, gui, old_c)
   

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line 
3010, in openWithFileName
return lm.openExistingLeoFile(file_name, gui, old_c)
   ^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line 
3209, in openExistingLeoFile
c = g.app.newCommander(
^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line 
1516, in newCommander
c = leoCommands.Commands(fileName,
^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py", 
line 165, in __init__
c.finishCreate()  # Slightly slow.


  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py", 
lin

Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Thomas Passin

On Wednesday, May 15, 2024 at 2:33:08 PM UTC-4 viktor@gmail.com wrote:

Hello Thomas,
[snip]
  File 
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line 
185, in __init__
g.app.spellDict = DefaultDict().d  # 2024/04/09: bug fix.
  ^^^

AttributeError: 'DefaultDict' object has no attribute 'd'


Funny, that looks like a bug in the devel branch that was fixed already. 

Strange, but the version of the devel branch you are running is not the 
current one, and I can't even find yours on Github.  The current commit 
is eef303a2d0fc1e41634376058fa5ace2ac9fad95.  Try updating your clone, or 
downloading a zip of the current version of the devel branch and using that 
one.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7d40b36d-6f81-4146-aec3-dec62ee83660n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Viktor Ransmayr
Hello Thomas,

Am Mi., 15. Mai 2024 um 15:28 Uhr schrieb Thomas Passin :

> It's hard for me to know what you want to convey with these long
> transcripts.
>

I'm sorry !

I just realized right now , that Gmail did not keep' my selection of
"Courier New" for all parts of the logs.


> It would be better if they were edited, or at least if you would point out
> results that you don't like or don't understand.
>

Again sorry, if my msg / point was not clear enough - but - I thought I had
state it ...

"""
I'd like to understand, why the case of 'Leo from GitHub in a PyVE' is no
longer working ?  - It has worked on Linux (Debian & Fedora) up until Leo
version 6.7.7 (maybe evern 6.7.8) !
"""


> But I can see a few things, I think:
>
> 1. Installing Leo's dependencies using pip -r requirements.txt does not
> install Leo itself.  It does not create those scripts in the venv's bin
> directory.  It only installs the modules and packages that Leo needs.  You
> have to install Leo using pip for that (while the venv is active).  For
> example, in my "leo" venv, which has Leo's dependencies but into which I
> haven't installed leo using pip, there is no *leo* script:
>
> (leo) tom@thomas-xubuntu-VirtualBox:~/venv$ ls leo/bin/ |grep "leo"
> # there was no result
>

Yes, that confirms, what I stated in my logs as well.


> 2. Using python3 -m leo.core.runLeo, when you have cd'ed to your github's
> leo-editor directory, finds Leo's files because Python starts looking for
> files starting at the current directory.  If you export the PYTHONPATH
> shell variable, then Python will start by looking there.  That's why I
> recommend using a script that sets the variable.  Then you don't have to
> remember to cd to the right directory first.
>

Thanks, that was new / unkown to me - and - explains what I reported in the
previous "Log-003".


> 3. Even after you have activated your venv, the shell will not find its
> *leo* script because there isn't one. It won't be there unless you
> pip-install Leo while the venv is activated. The results from running
> *which* show that.  You could also use *whereis*, and get the same
> result.  Even if you installed Leo in the venv and started Leo using the
> venv's *leo* script, Leo would be using the Leo code in the venv, not the
> code in your github repo.
>

Could / should Leo's documentation be improved ? - I did exactly what it
says [1] now.


> 4. Your transcript shows that Leo started when you had cd'ed to its repo
> directory.  But I can only see Leo's startup output to the console. That
> output looks normal.  But it doesn't tell me if the Leo window actually
> opened and worked.  Did it?
>

No !

If I move down into "~/PyVE/GitHub/Leo/leo-editor"  - and - try to 'really'
run Leo, it fails with the following traceback - See "Log-001".

With kind regards,

Viktor

---

[1]
https://leo-editor.github.io/leo-editor/installing.html#installing-leo-from-github

### Log-001

user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m
leo.core.runLeo &
[1] 878
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ setting leoID
from os.getenv('USER'): 'user'
Leo 6.7.9-devel, devel branch, build fb85027eac
2024-05-13 16:10:23 -0500
Python 3.11.2, PyQt version 6.7.0
linux
Can not load session
Traceback (most recent call last):

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
2307, in doPostPluginsInit
g.app.sessionManager.load_session(c1, aList)

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoSessions.py",
line 72, in load_session
g.openWithFileName(fn, gui=g.app.gui, old_c=c)

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoGlobals.py", line
3238, in openWithFileName
return g.app.loadManager.openWithFileName(fileName, gui, old_c)
   

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
3010, in openWithFileName
return lm.openExistingLeoFile(file_name, gui, old_c)
   ^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
3209, in openExistingLeoFile
c = g.app.newCommander(
^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
1516, in newCommander
c = leoCommands.Commands(fileName,
^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py",
line 165, in __init__
c.finishCreate()  # Slightly slow.


  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py",
line 467, in finishCreate
c.frame.log.finishCreate()

  File "/home/user/PyVE/Gi

Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Thomas Passin
It's hard for me to know what you want to convey with these long 
transcripts.  It would be better if they were edited, or at least if you 
would point out results that you don't like or don't understand.  But I can 
see a few things, I think:

1. Installing Leo's dependencies using pip -r requirements.txt does not 
install Leo itself.  It does not create those scripts in the venv's bin 
directory.  It only installs the modules and packages that Leo needs.  You 
have to install Leo using pip for that (while the venv is active).  For 
example, in my "leo" venv, which has Leo's dependencies but into which I 
haven't installed leo using pip, there is no *leo* script:

(leo) tom@thomas-xubuntu-VirtualBox:~/venv$ ls leo/bin/ |grep "leo"
# there was no result

2. Using python3 -m leo.core.runLeo, when you have cd'ed to your github's 
leo-editor directory, finds Leo's files because Python starts looking for 
files starting at the current directory.  If you export the PYTHONPATH 
shell variable, then Python will start by looking there.  That's why I 
recommend using a script that sets the variable.  Then you don't have to 
remember to cd to the right directory first.

3. Even after you have activated your venv, the shell will not find its 
*leo* script because there isn't one. It won't be there unless you 
pip-install Leo while the venv is activated. The results from running 
*which* show that.  You could also use *whereis*, and get the same result.  
Even if you installed Leo in the venv and started Leo using the venv's *leo* 
script, 
Leo would be using the Leo code in the venv, not the code in your github 
repo.

4. Your transcript shows that Leo started when you had cd'ed to its repo 
directory.  But I can only see Leo's startup output to the console. That 
output looks normal.  But it doesn't tell me if the Leo window actually 
opened and worked.  Did it?

HTH


On Wednesday, May 15, 2024 at 6:22:34 AM UTC-4 viktor@gmail.com wrote:

Hello Thomas,

Thanks a lot for all the feedback & input you provided ! - I will read them 
one by one ...

tbp1...@gmail.com schrieb am Dienstag, 14. Mai 2024 um 20:05:10 UTC+2:

It can be hard to be sure what the Python search path is.  Here is what 
shows up for my system when I have activated my "Leo" VE.  This VE (on 
Windows) is contained in the directory  C:\Tom\venvs\leo. Note that on 
Windows you don't have to source the script.


Please bear with me a bit longer, as I'm sometimes stubborn ;-)

I'd like to understand, why the case of 'Leo from GitHub in a PyVE' is no 
longer working ?  - It has worked on Linux (Debian & Fedora) up until Leo 
version 6.7.7 (maybe evern 6.7.8) !

I'd like to do that, before creating an **additional personal** script, 
since I still believe it should be part of Leo's GitHub repository ...

I did use your advice to check  Python's search path, etc. - Here are the 
results for the three relevant cases in my Debian 12 VM:

* Check out Python's search path with Leo outside of any PyVE - See 
"Log-001".
* Check out search path in Leo's PyVE from PyPI - See "Log-002".
* Check out search path in Leo's PyVE from GitHub - See "Log-003".

Note 1: The first variation is necessary for me to address Leo-Integ issue 
# 299 .

Note 2: The answer to my question has to do with the fact that no 'leo' 
module is found in '/home/user/PyVE/GitHub/Leo/bin'  - See "Log-003" ...

With kind regards,

Viktor

### Log-001

user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ python3 -c "import 
sys;print('\n'.join(sys.path))"

/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/home/user/.local/lib/python3.11/site-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.11/dist-packages
user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ python3 -m leo.core.runLeo --version
Leo 6.7.8
Python 3.11.2
linux

user@debian-leo-study-vm:~$ which leo
/home/user/.local/bin/leo
user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ echo $PATH

/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
user@debian-leo-study-vm:~$ 

### Log-002

user@debian-leo-study-vm:~$ cd PyVE/PyPI/Leo/
user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ python3 -c "import 
sys;print('\n'.join(sys.path))"

/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ python3 -m 
leo.core.runLeo --version
Leo 6.7.8
Python 3.11.2
linux

(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ which leo
/home/user/PyVE/PyPI/Leo/bin/leo
(Leo) user@debian-leo-study-vm

Re: Leo from GitHub in a PyVE on Debian ?

2024-05-15 Thread Viktor Ransmayr
Hello Thomas,

Thanks a lot for all the feedback & input you provided ! - I will read them 
one by one ...

tbp1...@gmail.com schrieb am Dienstag, 14. Mai 2024 um 20:05:10 UTC+2:

It can be hard to be sure what the Python search path is.  Here is what 
shows up for my system when I have activated my "Leo" VE.  This VE (on 
Windows) is contained in the directory  C:\Tom\venvs\leo. Note that on 
Windows you don't have to source the script.


Please bear with me a bit longer, as I'm sometimes stubborn ;-)

I'd like to understand, why the case of 'Leo from GitHub in a PyVE' is no 
longer working ?  - It has worked on Linux (Debian & Fedora) up until Leo 
version 6.7.7 (maybe evern 6.7.8) !

I'd like to do that, before creating an **additional personal** script, 
since I still believe it should be part of Leo's GitHub repository ...

I did use your advice to check  Python's search path, etc. - Here are the 
results for the three relevant cases in my Debian 12 VM:

* Check out Python's search path with Leo outside of any PyVE - See 
"Log-001".
* Check out search path in Leo's PyVE from PyPI - See "Log-002".
* Check out search path in Leo's PyVE from GitHub - See "Log-003".

Note 1: The first variation is necessary for me to address Leo-Integ issue 
# 299 .

Note 2: The answer to my question has to do with the fact that no 'leo' 
module is found in '/home/user/PyVE/GitHub/Leo/bin'  - See "Log-003" ...

With kind regards,

Viktor

### Log-001

user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ python3 -c "import 
sys;print('\n'.join(sys.path))"

/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/home/user/.local/lib/python3.11/site-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.11/dist-packages
user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ python3 -m leo.core.runLeo --version
Leo 6.7.8
Python 3.11.2
linux
user@debian-leo-study-vm:~$ which leo
/home/user/.local/bin/leo
user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ echo $PATH

/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
user@debian-leo-study-vm:~$ 

### Log-002

user@debian-leo-study-vm:~$ cd PyVE/PyPI/Leo/
user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ python3 -c "import 
sys;print('\n'.join(sys.path))"

/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ python3 -m 
leo.core.runLeo --version
Leo 6.7.8
Python 3.11.2
linux
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ which leo
/home/user/PyVE/PyPI/Leo/bin/leo
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ echo $PATH

/home/user/PyVE/PyPI/Leo/bin:/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
(Leo) user@debian-leo-study-vm:~/PyVE/PyPI/Leo$ 

### Log-003

user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ python3 -c "import 
sys;print('\n'.join(sys.path))"

/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/home/user/PyVE/GitHub/Leo/lib/python3.11/site-packages
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ python3 -m 
leo.core.runLeo --version
/home/user/PyVE/GitHub/Leo/bin/python3: Error while finding module 
specification for 'leo.core.runLeo' (ModuleNotFoundError: No module named 
'leo')
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ which leo
/home/user/.local/bin/leo
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
leo.core.runLeo --version
Leo 6.7.9-devel, devel branch, build fb85027eac
2024-05-13 16:10:23 -0500
Python 3.11.2
linux
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ which leo
/home/user/.local/bin/leo
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ echo $PATH

/home/user/PyVE/GitHub/Leo/bin:/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
(Leo) user@debian

Re: Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Thomas Passin
I though it might be useful to pull together the steps to create on Linux a 
new virtual environment (venv) and install Leo's dependencies into it.  I 
created a new venv in the ~/venv*/leo* directory for this purpose:

tom@thomas-xubuntu-VirtualBox:~/venv$ mkdir leo
tom@thomas-xubuntu-VirtualBox:~/venv$ python3 -m venv leo
tom@thomas-xubuntu-VirtualBox:~/venv$ source ./leo/bin/activate
(leo) tom@thomas-xubuntu-VirtualBox:~/venv$ python3 -m pip install -r 
~/git/leo-editor/requirements.txt 
  tom@thomas-xubuntu-VirtualBox:~/venv$

On Tuesday, May 14, 2024 at 2:40:34 PM UTC-4 Thomas Passin wrote:

> In case I didn't make it clear, I think a script like the one I showed 
> above is an excellent way to launch the copy of Leo that is in your cloned 
> repo.  That's because it works from anywhere and you don't need to remember 
> any special locations or cd to them  If you are in an activated venv, it 
> works and will use the venv version of the dependencies.  If you are not in 
> a venv, it will use the system Leo installation and dependencies, if you've 
> installed them there (I have - in the user site-packages directory, of 
> course, not the system's).
>
> On Tuesday, May 14, 2024 at 2:09:14 PM UTC-4 Thomas Passin wrote:
>
> On Tuesday, May 14, 2024 at 2:05:10 PM UTC-4 Thomas Passin wrote:
>
> The script to launch Leo is in the *Scripts* directory.
>
>
> Of course, in Linux this will be the *bin* directory instead.
>
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/75b0ff52-099a-4de5-8c19-f2809a67c8a1n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Thomas Passin
In case I didn't make it clear, I think a script like the one I showed 
above is an excellent way to launch the copy of Leo that is in your cloned 
repo.  That's because it works from anywhere and you don't need to remember 
any special locations or cd to them  If you are in an activated venv, it 
works and will use the venv version of the dependencies.  If you are not in 
a venv, it will use the system Leo installation and dependencies, if you've 
installed them there (I have - in the user site-packages directory, of 
course, not the system's).

On Tuesday, May 14, 2024 at 2:09:14 PM UTC-4 Thomas Passin wrote:

On Tuesday, May 14, 2024 at 2:05:10 PM UTC-4 Thomas Passin wrote:

The script to launch Leo is in the *Scripts* directory.


Of course, in Linux this will be the *bin* directory instead.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/bc070f06-8be4-42ed-a756-a0ec0001a927n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Thomas Passin

On Tuesday, May 14, 2024 at 2:05:10 PM UTC-4 Thomas Passin wrote:

The script to launch Leo is in the *Scripts* directory.


Of course, in Linux this will be the *bin* directory instead.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/6fc137a7-b258-4b5b-a6a2-d411998612f5n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Thomas Passin
It can be hard to be sure what the Python search path is.  Here is what 
shows up for my system when I have activated my "Leo" VE.  This VE (on 
Windows) is contained in the directory  C:\Tom\venvs\leo. Note that on 
Windows you don't have to source the script.

C:\Tom\venvs\leo>Scripts\activate

(leo) C:\Tom\venvs\leo>py -c "import sys;print('\n'.join(sys.path))

C:\Users\tom\AppData\Local\Programs\Python\Python312\python312.zip
C:\Users\tom\AppData\Local\Programs\Python\Python312\DLLs
C:\Users\tom\AppData\Local\Programs\Python\Python312\Lib
C:\Users\tom\AppData\Local\Programs\Python\Python312
C:\Tom\venvs\leo
C:\Tom\venvs\leo\Lib\site-packages
C:\Tom\venvs\leo\Lib\site-packages\win32
C:\Tom\venvs\leo\Lib\site-packages\win32\lib
C:\Tom\venvs\leo\Lib\site-packages\Pythonwin

This is for a pip-installed version of Leo, not one cloned from github.  
Notice how Python will search its original installation path first, then 
the venv paths.  Anything that was installed into the system's 
*Lib/sitepackages* location will be found first.  Especially on Linux it's 
unlikely that Leo was installed there.

The script to launch Leo is in the *Scripts* directory.

(leo) C:\Tom\venvs\leo>dir Scripts |find "leo"
 Directory of C:\Tom\venvs\leo\Scripts
02/28/2024  09:20 AM   108,401 leo-c.exe
02/28/2024  09:20 AM   108,401 leo-console.exe
02/28/2024  09:20 AM   108,385 leo-m.exe
02/28/2024  09:20 AM   108,385 leo-messages.exe
02/28/2024  09:20 AM   102,242 leo.exe

Otherwise, for this venv, when you issue the command python3 -m 
leo.core.runLeo,  Python will look for a *leo* directory from top to bottom 
in the list of directory on sys.path.  It will get to 
C:\Tom\venvs\leo\Lib\site-package, and will find it there.

Sometimes, and this applies to Debian IIRC, the first time Leo is installed 
on a computer you might see an error message when you try to run it. The error 
message will say that "libxcb-cursor0" is needed (that's "cursorZero", in 
case the font zero looks like the letter O). You can install that library 
with the system package installer (e.g., apt-get),  But that may or may not 
be the right name to use for the library.  If the install attempt doesn't 
work, you can check at http://pkgs.org/ to find a better package name.

For running Leo with a clone of the Leo repo, I use a little script that 
sets the PYTHONPATH to the location of the cloned repo.  Here's my Linux 
script (the git clone is in ~/git/leo-editor):

(qt6) tom@thomas-xubuntu-VirtualBox:~/venv/qt6$ whereis py-leo-git
py-leo-git: /home/tom/.local/bin/py-leo-git
(qt6) tom@thomas-xubuntu-VirtualBox:~/venv/qt6$ cat 
/home/tom/.local/bin/py-leo-git
#! /usr/bin/bash 
if [ "$PYTHONPATH" == "" ]; then 
export PYTHONPATH=~/git/leo-editor
echo "Using PYTHONPATH:" $PYTHONPATH
else
echo "PYTHONPATH already set to " $PYTHONPATH
fi

python3 -m leo.core.runLeo $*

Running this script from inside your activated venv will run Python using 
the copy of Leo that is located in the repo.

HTH

On Tuesday, May 14, 2024 at 1:15:19 PM UTC-4 viktor@gmail.com wrote:

Hello Thomas,

tbp1...@gmail.com schrieb am Dienstag, 14. Mai 2024 um 16:03:20 UTC+2:

I wonder whether you VE activation somehow got lost during this process.  I 
noticed this:

~$ which leo
/home/user/.local/bin/leo

This says that typing "leo" uses that script, which is not one in the VE.  
Try this, and let us know what happens -

First, activate your VE environment.  Then issue

python3 -m leo.core.runLeo --version

You should get something like this:

Leo 6.7.9-devel, ekr-3892-vr-pane branch, build 8ede3fc77e
2024-05-14 05:12:23 -0500
Python 3.11.6
linux


Thanks a lot for your feedback ! - This is what the command returns in the 
first place:

user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/

user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ python3 -m 
leo.core.runLeo --version
/home/user/PyVE/GitHub/Leo/bin/python3: Error while finding module 
specification for 'leo.core.runLeo' (ModuleNotFoundError: No module named 
'leo')
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 

Only if I move a directory 'down' the command works:

(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
leo.core.runLeo --version
Leo 6.7.9-devel, devel branch, build fb85027eac
2024-05-13 16:10:23 -0500
Python 3.11.2
linux
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 

I guess some more ' reading' on my side is needed ...

With kind regards,

Viktor

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receivi

Re: Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Viktor Ransmayr
Hello Thomas,

tbp1...@gmail.com schrieb am Dienstag, 14. Mai 2024 um 16:03:20 UTC+2:

I wonder whether you VE activation somehow got lost during this process.  I 
noticed this:

~$ which leo
/home/user/.local/bin/leo

This says that typing "leo" uses that script, which is not one in the VE.  
Try this, and let us know what happens -

First, activate your VE environment.  Then issue

python3 -m leo.core.runLeo --version

You should get something like this:

Leo 6.7.9-devel, ekr-3892-vr-pane branch, build 8ede3fc77e
2024-05-14 05:12:23 -0500
Python 3.11.6
linux


Thanks a lot for your feedback ! - This is what the command returns in the 
first place:

user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ python3 -m 
leo.core.runLeo --version
/home/user/PyVE/GitHub/Leo/bin/python3: Error while finding module 
specification for 'leo.core.runLeo' (ModuleNotFoundError: No module named 
'leo')
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 

Only if I move a directory 'down' the command works:

(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
leo.core.runLeo --version
Leo 6.7.9-devel, devel branch, build fb85027eac
2024-05-13 16:10:23 -0500
Python 3.11.2
linux
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 

I guess some more ' reading' on my side is needed ...

With kind regards,

Viktor

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/9068145d-e1f6-423d-a7de-652681f49459n%40googlegroups.com.


Re: Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Thomas Passin
I wonder whether you VE activation somehow got lost during this process.  I 
noticed this:

~$ which leo
/home/user/.local/bin/leo

This says that typing "leo" uses that script, which is not one in the VE.  
Try this, and let us know what happens -

First, activate your VE environment.  Then issue

python3 -m leo.core.runLeo --version

You should get something like this:

Leo 6.7.9-devel, ekr-3892-vr-pane branch, build 8ede3fc77e
2024-05-14 05:12:23 -0500
Python 3.11.6
linux

I always run Leo that way, or with a script that uses the incantation.  You 
are guaranteed to run the version of Leo that goes along with that version 
of python3, and if you have activated the VE then Python's module search 
path will be within the VE.  Otherwise, you are at the mercy of the system, 
which may not have the same idea as you as to what to run.

I often create one desktop icon to run the ordinary release of Leo and 
another one to run from my git-clone directory.  I recommend that you do 
the same (or create two launch scripts and use them).

On Tuesday, May 14, 2024 at 8:54:38 AM UTC-4 viktor@gmail.com wrote:

Hello everyone,

Today I have started again to check out the status of Leo (devel branch) 
from GitHub within a Debian 12 VM.

I believe that I did follow the (new) recommended steps for Leo, i.e.:

* Created a new PyVE for Leo from GitHub - OK - See "Log-001".
* Installed Leo from GitHub from scratch - Not OK - See "Log-002".

Has anybody else tried such a setup - and / or - does anyone of you have an 
explanation what is going wrong / what I'm missing ?

If I try the same in a similar environment, with Leo using pip from PyPI, I 
get the following status, which I'd have expected in a similar fashion also 
for the setup from GitHub - See "Log-003".

Thanks a lot for any kind of feedback !

[snip] 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/082e4d9c-c09b-4557-86cc-f1fadf513371n%40googlegroups.com.


Leo from GitHub in a PyVE on Debian ?

2024-05-14 Thread Viktor Ransmayr
Hello everyone,

Today I have started again to check out the status of Leo (devel branch) 
from GitHub within a Debian 12 VM.

I believe that I did follow the (new) recommended steps for Leo, i.e.:

* Created a new PyVE for Leo from GitHub - OK - See "Log-001".
* Installed Leo from GitHub from scratch - Not OK - See "Log-002".

Has anybody else tried such a setup - and / or - does anyone of you have an 
explanation what is going wrong / what I'm missing ?

If I try the same in a similar environment, with Leo using pip from PyPI, I 
get the following status, which I'd have expected in a similar fashion also 
for the setup from GitHub - See "Log-003".

Thanks a lot for any kind of feedback !

With kind regards,

Viktor

### Log-001

user@debian-leo-study-vm:~$ 
user@debian-leo-study-vm:~$ cd PyVE/GitHub/
user@debian-leo-study-vm:~/PyVE/GitHub$ 
user@debian-leo-study-vm:~/PyVE/GitHub$ rm -rf Leo
user@debian-leo-study-vm:~/PyVE/GitHub$ 
user@debian-leo-study-vm:~/PyVE/GitHub$ python3 -m venv Leo
user@debian-leo-study-vm:~/PyVE/GitHub$ 
user@debian-leo-study-vm:~/PyVE/GitHub$ cd Leo/
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 

### Log-002

(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ git clone 
https://github.com/leo-editor/leo-editor.git
Cloning into 'leo-editor'...
remote: Enumerating objects: 232512, done.
remote: Counting objects: 100% (848/848), done.
remote: Compressing objects: 100% (241/241), done.
remote: Total 232512 (delta 625), reused 783 (delta 607), pack-reused 
231664
Receiving objects: 100% (232512/232512), 237.68 MiB | 3.88 MiB/s, done.
Resolving deltas: 100% (184943/184943), done.
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ git branch
* devel
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
pip list
PackageVersion
-- ---
pip23.0.1
setuptools 66.1.1
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m 
pip install -r requirements.txt
Ignoring Send2Trash: markers 'platform_system == "Windows"' don't match 
your environment
Ignoring windows-curses: markers 'platform_system == "Windows"' don't 
match your environment
Collecting mypy
  Using cached 
mypy-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
(12.6 MB)
Collecting mypy-extensions
  Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting ruff
  Using cached 
ruff-0.4.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.7 MB)
Collecting typing_extensions
  Using cached typing_extensions-4.11.0-py3-none-any.whl (34 kB)
Collecting types-docutils
  Using cached types_docutils-0.21.0.20240423-py3-none-any.whl (27 kB)
Collecting types-Markdown
  Using cached types_Markdown-3.6.0.20240316-py3-none-any.whl (18 kB)
Collecting types-paramiko
  Using cached types_paramiko-3.4.0.20240423-py3-none-any.whl (33 kB)
Collecting types-PyYAML
  Using cached types_PyYAML-6.0.12.20240311-py3-none-any.whl (15 kB)
Collecting types-requests
  Using cached types_requests-2.31.0.20240406-py3-none-any.whl (15 kB)
Collecting types-six
  Using cached types_six-1.16.21.20240513-py3-none-any.whl (15 kB)
Collecting asttokens
  Using cached asttokens-2.4.1-py2.py3-none-any.whl (27 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)
Collecting black
  Using cached 
black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
(1.8 MB)
Collecting docutils
  Using cached docutils-0.21.2-py3-none-any.whl (587 kB)
Collecting flexx
  Using cached flexx-0.8.4-py2.py3-none-any.whl (351 kB)
Collecting markdown
  Using cached Markdown-3.6-py3-none-any.whl (105 kB)
Collecting matplotlib
  Using cached 
matplotlib-3.8.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
(11.6 MB)
Collecting meta
  Using cached meta-1.0.2-py3-none-any.whl
Collecting numpy
  Using cached 
numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
(18.3 MB)
Collecting pyenchant
  Using cached pyenchant-3.2.2-py3-none-any.whl (55 kB)
Collecting pyflakes
  Using cached pyflakes-3.2.0-py2.py3-none-any.whl (62 kB)
Collecting pytest
  Using cached pytest-8.2.0-py3-none-any.whl (339 kB)
Collecting pytest-cov
  Using cached pytest