Leo 6.8.0 from PyPI does not work in a new VM

38 views
Skip to first unread message

Viktor Ransmayr

unread,
Jul 12, 2024, 5:57:22 AM (10 days ago) Jul 12
to leo-editor
Hello Edward,

There is a problem with the latest release of Leo from PyPI.

I did document the problem the following way:
  • Use a new VM & try to install Leo from PyPI - Not OK - See "Log-001".
  • Install & run the previous version of Leo from PyPI - OK - See "Log-002".
  •  Now try to update Leo to the latest stable version - OK - See "Log-003".
Leo 6.8.0 from PyPI does not work, because it is missing its dependencies !

I did not notice it earlier, because I was always working with an existing older version of Leo installed in my VMs ...

With kind regards,

Viktor

### Log-001

    user@Test-VM5:~$
    user@Test-VM5:~$ mkdir PyVE; cd PyVE
    user@Test-VM5:~/PyVE$
    user@Test-VM5:~/PyVE$ mkdir PyPI; cd PyPI
    user@Test-VM5:~/PyVE/PyPI$
    user@Test-VM5:~/PyVE/PyPI$ python3 -m venv Leo
    user@Test-VM5:~/PyVE/PyPI$
    user@Test-VM5:~/PyVE/PyPI$ cd Leo/
    user@Test-VM5:~/PyVE/PyPI/Leo$
    user@Test-VM5:~/PyVE/PyPI/Leo$ source bin/activate
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ python3 -m pip list
    Package    Version
    ---------- -------
    pip        23.0.1
    setuptools 66.1.1
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ python3 -m pip install leo
    Collecting leo
      Downloading leo-6.8.0-py3-none-any.whl (19.5 MB)
         ��� ... ��� 19.5/19.5 MB 722.9 kB/s eta 0:00:00
    Installing collected packages: leo
    Successfully installed leo-6.8.0
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ which leo
    /home/user/PyVE/PyPI/Leo/bin/leo
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ leo --version
    Error starting Leo!
    Please verify you've installed the required dependencies:
    https://leo-editor.github.io/leo-editor/installing.html
    Please ask for help at https://groups.google.com/g/leo-editor

    Traceback (most recent call last):
      File "/home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/core/runLeo.py", line 45, in <module>
        from leo.core import leoApp
      File "/home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/core/leoApp.py", line 21, in <module>
        from leo.core.leoQt import QCloseEvent
      File "/home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/core/leoQt.py", line 5, in <module>
        from PyQt6 import QtCore, QtGui, QtWidgets
    ModuleNotFoundError: No module named 'PyQt6'
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$

### Log-002

    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ python3 -m pip install leo==6.7.8.post3

    ...

    Installing collected packages: tk, snowballstemmer, PyQt6-WebEngineSubwheel-Qt6, PyQt6-Qt6, pscript, meta, dialite, webruntime, urllib3, typing-extensions, types-six, types-PyYAML, types-Markdown, types-docutils, tornado, tomlkit, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, soupsieve, six, pyshortcuts, PyQt6-WebEngine-Qt6, PyQt6-sip, Pygments, pyflakes, pyenchant, pycparser, pluggy, platformdirs, pathspec, packaging, mypy-extensions, mccabe, MarkupSafe, isort, iniconfig, imagesize, idna, docutils, dill, coverage, click, charset-normalizer, certifi, babel, astroid, alabaster, types-requests, requests, pytest, PyQt6, pylint, mypy, Jinja2, flexx, cffi, black, beautifulsoup4, asttokens, sphinx, pytest-cov, PyQt6-WebEngine, cryptography, types-paramiko, leo
      DEPRECATION: meta is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
      Running setup.py install for meta ... done
      Attempting uninstall: leo
        Found existing installation: leo 6.8.0
        Uninstalling leo-6.8.0:
          Successfully uninstalled leo-6.8.0
    Successfully installed Jinja2-3.1.4 MarkupSafe-2.1.5 PyQt6-6.7.0 PyQt6-Qt6-6.7.2 PyQt6-WebEngine-6.7.0 PyQt6-WebEngine-Qt6-6.7.2 PyQt6-WebEngineSubwheel-Qt6-6.7.2 PyQt6-sip-13.6.0 Pygments-2.18.0 alabaster-0.7.16 astroid-3.2.3 asttokens-2.4.1 babel-2.15.0 beautifulsoup4-4.12.3 black-24.4.2 certifi-2024.7.4 cffi-1.16.0 charset-normalizer-3.3.2 click-8.1.7 coverage-7.6.0 cryptography-42.0.8 dialite-0.5.3 dill-0.3.8 docutils-0.21.2 flexx-0.8.4 idna-3.7 imagesize-1.4.1 iniconfig-2.0.0 isort-5.13.2 leo-6.7.8.post3 mccabe-0.7.0 meta-1.0.2 mypy-1.10.1 mypy-extensions-1.0.0 packaging-24.1 pathspec-0.12.1 platformdirs-4.2.2 pluggy-1.5.0 pscript-0.7.7 pycparser-2.22 pyenchant-3.2.2 pyflakes-3.2.0 pylint-3.2.5 pyshortcuts-1.9.0 pytest-8.2.2 pytest-cov-5.0.0 requests-2.32.3 six-1.16.0 snowballstemmer-2.2.0 soupsieve-2.5 sphinx-7.3.7 sphinxcontrib-applehelp-1.0.8 sphinxcontrib-devhelp-1.0.6 sphinxcontrib-htmlhelp-2.0.5 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.7 sphinxcontrib-serializinghtml-1.1.10 tk-0.1.0 tomlkit-0.13.0 tornado-6.4.1 types-Markdown-3.6.0.20240316 types-PyYAML-6.0.12.20240311 types-docutils-0.21.0.20240711 types-paramiko-3.4.0.20240423 types-requests-2.32.0.20240712 types-six-1.16.21.20240513 typing-extensions-4.12.2 urllib3-2.2.2 webruntime-0.5.8
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ which leo
    /home/user/PyVE/PyPI/Leo/bin/leo
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ leo --version
    Leo 6.7.8
    Python 3.11.2
    linux
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$

   ###

    Leo Log Window
    Leo 6.7.8
    Python 3.11.2, PyQt version 6.7.2
    linux
    setting leoID from os.getenv('USER'): 'user'
          home: /home/user
    leo-editor: /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages
          load: /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/core
        config: /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/config
    reading settings in /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/config/leoSettings.leo
    unexpected error creating: None
    Traceback (most recent call last):
      File "/home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/commands/spellCommands.py", line 65, in create
        f = open(fn, mode='wb')
            ^^^^^^^^^^^^^^^^^^^
    TypeError: expected str, bytes or os.PathLike object, not NoneType


### Log-003

    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ python3 -m pip install --upgrade leo
    Requirement already satisfied: leo in ./lib/python3.11/site-packages (6.7.8.post3)
    Collecting leo
      Using cached leo-6.8.0-py3-none-any.whl (19.5 MB)
    Installing collected packages: leo
      Attempting uninstall: leo
        Found existing installation: leo 6.7.8.post3
        Uninstalling leo-6.7.8.post3:
          Successfully uninstalled leo-6.7.8.post3
    Successfully installed leo-6.8.0
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ which leo
    /home/user/PyVE/PyPI/Leo/bin/leo
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$ leo --version
    Leo 6.8.0
    Python 3.11.2
    linux
    (Leo) user@Test-VM5:~/PyVE/PyPI/Leo$

    ###

    Leo Log Window
    Leo 6.8.0
    Python 3.11.2, PyQt version 6.7.2
    linux
    setting leoID from os.getenv('USER'): 'user'
          home: /home/user
    leo-editor: /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages
          load: /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/core
        config: /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/config
    reading settings in /home/user/PyVE/PyPI/Leo/lib/python3.11/site-packages/leo/config/leoSettings.leo


Thomas Passin

unread,
Jul 12, 2024, 8:30:05 AM (10 days ago) Jul 12
to leo-editor
On Friday, July 12, 2024 at 5:57:22 AM UTC-4 viktor....@gmail.com wrote:
Hello Edward,

There is a problem with the latest release of Leo from PyPI

I can confirm this on both Linux and Windows, and the cause is that pip isn't installing *any* of the dependencies into the venv.  If you have a venv that already contains the dependencies (from a previous installation) then upgrading to Leo 6.8.0 will appear to succeed because those dependencies were already there.

This might happen to a new user - who is not using a venv - who has never installed Leo.  That's hard to test for anyone who has already installed Leo.

I don't know if this is a pip issue or a Leo one.  But if it were pip, one would think it would already have been discovered and reported.

Viktor Ransmayr

unread,
Jul 12, 2024, 4:19:38 PM (10 days ago) Jul 12
to leo-editor
Hello Thomas,

tbp1...@gmail.com schrieb am Freitag, 12. Juli 2024 um 14:30:05 UTC+2:
On Friday, July 12, 2024 at 5:57:22 AM UTC-4 viktor....@gmail.com wrote:
Hello Edward,

There is a problem with the latest release of Leo from PyPI

I can confirm this on both Linux and Windows, and the cause is that pip isn't installing *any* of the dependencies into the venv.  If you have a venv that already contains the dependencies (from a previous installation) then upgrading to Leo 6.8.0 will appear to succeed because those dependencies were already there.

Just a small clarification: The problem is NOT related / specific to 'venv'.

That is it also happens if you try to install Leo 6.8.0 from PyPI system wide !

For a change I did verify this statement with a new Fedora Linux 40 VM - See "Log-001" & "Log-002".

With kind regards,

Viktor

### Log-001

    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ uname --all
    Linux Test-VM2 6.6.33-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 17 13:20:02 GMT 2024 x86_64 GNU/Linux
    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ python3 --version
    Python 3.12.4
    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ python3 -m pip --version
    pip 23.3.2 from /usr/lib/python3.12/site-packages/pip (python 3.12)
    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ python3 -m pip list
    Package           Version
    ----------------- --------
    cffi              1.16.0
    dbus-python       1.3.2
    distro            1.9.0
    dnf               4.21.0
    docutils          0.20.1
    gbulb             0.6.4
    idna              3.7
    libcomps          0.1.20
    libdnf            0.73.2
    lockfile          0.12.2
    numpy             1.26.4
    olefile           0.47
    pillow            10.3.0
    pip               23.3.2
    ply               3.11
    pycairo           1.25.1
    pycparser         2.20
    PyGObject         3.48.2
    pygrub            0.7
    pyinotify         0.9.6
    pyparsing         3.1.2
    PySocks           1.7.1
    python-daemon     2.3.2
    python-dateutil   2.8.2
    pyxdg             0.27
    qrexec            4.2.19
    qubesagent        4.2.35
    QubesDB           1.0
    qubesimgconverter 4.2.17
    rpm               4.19.1.1
    setuptools        69.0.3
    six               1.16.0
    systemd-python    235
    urllib3           1.26.19
    xcffib            1.5.0
    [user@Test-VM2 ~]$


### Log-002

    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ python3 -m pip install leo
    Defaulting to user installation because normal site-packages is not writeable
    Collecting leo
      Downloading leo-6.8.0-py3-none-any.whl.metadata (3.7 kB)
    Downloading leo-6.8.0-py3-none-any.whl (19.5 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.5/19.5 MB 200.1 kB/s eta 0:00:00

    Installing collected packages: leo
    Successfully installed leo-6.8.0
    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ which leo
    ~/.local/bin/leo
    [user@Test-VM2 ~]$
    [user@Test-VM2 ~]$ leo --version

    Error starting Leo!
    Please verify you've installed the required dependencies:
    https://leo-editor.github.io/leo-editor/installing.html
    Please ask for help at https://groups.google.com/g/leo-editor

    Traceback (most recent call last):
      File "/home/user/.local/lib/python3.12/site-packages/leo/core/runLeo.py", line 45, in <module>
        from leo.core import leoApp
      File "/home/user/.local/lib/python3.12/site-packages/leo/core/leoApp.py", line 21, in <module>
        from leo.core.leoQt import QCloseEvent
      File "/home/user/.local/lib/python3.12/site-packages/leo/core/leoQt.py", line 5, in <module>

        from PyQt6 import QtCore, QtGui, QtWidgets
    ModuleNotFoundError: No module named 'PyQt6'
    [user@Test-VM2 ~]$
 

Thomas Passin

unread,
Jul 12, 2024, 9:49:56 PM (9 days ago) Jul 12
to leo-editor
On Friday, July 12, 2024 at 4:19:38 PM UTC-4 viktor....@gmail.com wrote:
Hello Thomas,

tbp1...@gmail.com schrieb am Freitag, 12. Juli 2024 um 14:30:05 UTC+2:
On Friday, July 12, 2024 at 5:57:22 AM UTC-4 viktor....@gmail.com wrote:
Hello Edward,

There is a problem with the latest release of Leo from PyPI

I can confirm this on both Linux and Windows, and the cause is that pip isn't installing *any* of the dependencies into the venv.  If you have a venv that already contains the dependencies (from a previous installation) then upgrading to Leo 6.8.0 will appear to succeed because those dependencies were already there.

Just a small clarification: The problem is NOT related / specific to 'venv'.

That is it also happens if you try to install Leo 6.8.0 from PyPI system wide !

I thought that it would be so but would have had to spin up a new VM to make sure.

Edward K. Ream

unread,
Jul 13, 2024, 6:35:25 AM (9 days ago) Jul 13
to leo-e...@googlegroups.com
On Fri, Jul 12, 2024 at 3:19 PM Viktor Ransmayr wrote:

Just a small clarification: The problem is NOT related / specific to 'venv'.

That is it also happens if you try to install Leo 6.8.0 from PyPI system wide !

Exactly. I don't use venv. Instead I have scripts to call pip install system wide.

I confirmed the problem without venv and I'll test the solution without venv.

Edward
Reply all
Reply to author
Forward
0 new messages