pooler / electrum-ltc

Electrum-LTC Litecoin wallet
https://electrum-ltc.org
MIT License
199 stars 102 forks source link

Python-setuptools must not be just an optional dependency, because without it Electrum-ltc won't start! #325

Open kde-user opened 5 months ago

kde-user commented 5 months ago

Operating system: Archlinux KDE/Plasma (CachyOS) -> electrum-ltc (4.2.2.1-5) installed from the AUR

Hello,

I've spent a few days getting Electrum-ltc to work!

At first it installed, but wouldn't start.

When I tried it via the console, the following message appeared:

❯ electrum-ltc
E | daemon.Daemon | GUI raised exception: ModuleNotFoundError("No module named 'distutils'"). shutting down.
E | __main__ | daemon.run_gui errored
Traceback (most recent call last):
  File "/usr/bin/electrum-ltc", line 426, in handle_cmd
    d.run_gui(config, plugins)
  File "/usr/lib/python3.12/site-packages/electrum_ltc/daemon.py", line 625, in run_gui
    gui = __import__('electrum_ltc.gui.' + gui_name, fromlist=['electrum_ltc'])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/electrum_ltc/gui/qt/__init__.py", line 65, in <module>
    from .main_window import ElectrumWindow
  File "/usr/lib/python3.12/site-packages/electrum_ltc/gui/qt/main_window.py", line 101, in <module>
    from .update_checker import UpdateCheck, UpdateCheckThread
  File "/usr/lib/python3.12/site-packages/electrum_ltc/gui/qt/update_checker.py", line 7, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

In short, as it turns out, I had answered "Remove dependencies after installation?" with "Yes" during installation. That was the mistake! Because this removed the "optional" dependency python-setuptools. If you reinstall it or select "No" to the above question during the electrum-ltc installation, Electrum-ltc starts.

Conclusion: python-setuptools is therefore absolutely necessary for Electrum-ltc. It should therefore be installed automatically as a required dependency and not just as an optional one. If that had been the case, I would have saved myself a few days of effort and a lot of nerves!