On Wed, Nov 20, 2024 at 9:37 AM Edward K. Ream <[email protected]> wrote:
> It seems that we are discussing two different issues: 'restart-leo' vs starting Leo. Here are my recent tests. *Run python -m leo.core.runLeo from my home directory* *C:\Users\Dev*>python -m leo.core.runLeo C:\Python\Python3.12\python.exe: Error while finding module specification for 'leo.core.runLeo' (ModuleNotFoundError: No module named 'leo') *This is the expected result.* I'll show the result after *pip install leo* later. *Run python -m leo.core.runLeo from Leo's github repo* *c:\Repos\leo-editor*>python -m leo.core.runLeo Leo 6.8.3-devel, ekr-726-at-language-vue2 branch, build eab3d7e0a2 2024-11-20 04:46:08 -0600 Python 3.12.0, PyQt version 6.7.3 Windows 11 AMD64 (build 10.0.26100) SP0 wrote recent file: C:/Users/Dev/.leo/.leoRecentFiles.txt This is the expected result. *Now run restart-leo* Restarting Leo... os.chdir(c:\Repos\leo-editor) <=== subprocess.run([ C:\Python\Python3.12\python.exe, c:\Repos\leo-editor\leo\core\runLeo.py <=== ]) Leo 6.8.3-devel, ekr-726-at-language-vue2 branch, build eab3d7e0a2 2024-11-20 04:46:08 -0600 Python 3.12.0, PyQt version 6.7.3 Windows 11 AMD64 (build 10.0.26100) SP0 wrote recent file: C:/Users/Dev/.leo/.leoRecentFiles.txt This is the expected result. restart-leo *always* shows these arguments. *No additional traces needed.* *Now pip install leo* c:\Repos\leo-editor>python -m pip install leo Collecting leo Using cached leo-6.8.2-py3-none-any.whl.metadata (4.5 kB) [big snip] Installing collected packages: leo WARNING: The scripts leo-c.exe, leo-console.exe and leo.exe are installed in 'C:\Python\Python3.12\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed leo-6.8.2 *Note that my workflow never pollutes sys.path.* *Run Leo from home (using pip-installed leo)* C:\Users\Dev>python -m leo.core.runLeo Leo 6.8.2 Python 3.12.0, PyQt version 6.7.3 Windows 11 AMD64 (build 10.0.26100) SP0 wrote recent file: C:/Users/Dev/.leo/.leoRecentFiles.txt Restarting Leo... os.chdir(C:\Users\Dev) <=== subprocess.run([ C:\Python\Python3.12\python.exe, C:\Python\Python3.12\Lib\site-packages\leo\core\runLeo.py <=== ]) Leo 6.8.2 Python 3.12.0, PyQt version 6.7.3 Windows 11 AMD64 (build 10.0.26100) SP0 wrote recent file: C:/Users/Dev/.leo/.leoRecentFiles.txt Once again, this is as expected. *Summary* *python -m leo.core.runLeo* works as expected from all locations. *restart-leo* works as expected at all times. Edward -- 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 visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS1T2VseM2qod%2BY%2BSLm0LcnyY1WQSzOfK3UADx6w_LQ_BA%40mail.gmail.com.
