Closed jlopp closed 1 year ago
how did you install the ledger-related deps, and where did you find the instructions you used?
try pip installing hidapi
. Also,
https://github.com/spesmilo/electrum/blob/847b3e919326244cef601a1bf948cfcf2b5148d5/contrib/requirements/requirements-hw.txt#L15-L18
That version of ledger-bitcoin
might be too new, not sure atm.
I'm trying to run Electrum 4.2.2 from source
I guess you mean 4.4.2?
Yeah, Electrum 4.4.2. I had installed ledger_bitcoin manually but have uninstalled it and ran
pip3 install contrib/requirements/requirements-hw.txt
Now when I ./run_electrum I get:
$ ./run_electrum
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
0.85 | E | plugins.ledger.ledger | error importing ledger plugin deps
Traceback (most recent call last):
File "electrum/electrum/plugins/ledger/ledger.py", line 40, in <module>
import hid
File "~/.local/lib/python3.10/site-packages/hid/__init__.py", line 30, in <module>
raise ImportError(error)
ImportError: Unable to load any of the following libraries:libhidapi-hidraw.so libhidapi-hidraw.so.0 libhidapi-libusb.so libhidapi-libusb.so.0 libhidapi-iohidmanager.so libhidapi-iohidmanager.so.0 libhidapi.dylib hidapi.dll libhidapi-0.dll
0.86 | W | plugins.ledger.qt.Plugin | Library version for 'ledger' is incompatible.
Installed: 0.1.2, Needed: 0.1.1 <= x < inf
The readme mentions this doc: https://github.com/spesmilo/electrum/blame/847b3e919326244cef601a1bf948cfcf2b5148d5/README.md#L57-L58
Although atm it is a bit outdated for ledger in particular. I'll try to update it.
Anyway, you should be okay re step 2 in that doc, but see steps 1 and 3, i.e.
$ sudo apt-get install libusb-1.0-0-dev libudev-dev
and setting up udev rules.
I was able to fix it via:
pip3 uninstall -r contrib/requirements/requirements-hw.txt
pip3 install -r contrib/requirements/requirements-hw.txt
I'd just note that the format of the error that was output is really really hard to interpret; it seems backwards
Installed: 0.2.1, Needed: 0.1.1 <= x < inf
Reads to me as "version must be greater than or equal to 0.1.1 and less than infinity"
Reads to me as "version must be greater than or equal to 0.1.1 and less than infinity"
Yes, that is exactly what it says though. The runtime checks atm only specify those contraints Your original issue was about not having hidapi installed I think, you can see that in the traceback logged just above the inequality. The error manifested when trying to import ledger-bitcoin, hence it was guessed that your version is not compatible -- but turns out it might have just been that a dependency was missing. 0.2.1 being too new I was just guessing based on the requirements file I referenced above.
Anyway, I will test that newer version tomorrow for compatibility.
I'm trying to run Electrum 4.2.2 from source on an Ubuntu machine.
Not sure what's wrong, as it seems like I should meet the requirements.