Author

Topic: Electrum error: "No module named keepkeylib.qt.pinmatrix" (Read 131 times)

hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
We digress, but yes that's the dangerously outdated Electrum you would get from the Snap store. I don't even know who this snap package creator/publisher is, what his relation to the Electrum project is and why this snap package is so blatantly unmaintained.

Anyway, do NOT install and use this totally outdated Electrum from snapcraft.io Snap store!

Code:
$ snap info --verbose electrum
name:      electrum
summary:   Lightweight Bitcoin Client
publisher: Tomas CaseyWilcox (antonwilc0x)
store-url: https://snapcraft.io/electrum
contact:   [email protected]
links:
  contact:
    - mailto:[email protected]
license: MIT
description: |
  Electrum is a lightweight Bitcoin client, based on a client-server protocol.
notes:        
  private:     false
  confinement: strict
snap-id: arteQqwdIGwtP3ETSe58cRbhdsa9oS4z
channels:
  latest/stable:    2.6.4-tpaw0 2017-05-17 (2) 111MB -
  latest/candidate: 2.6.4-tpaw0 2017-05-17 (2) 111MB -
  latest/beta:      2.6.4-tpaw0 2017-05-17 (2) 111MB -
  latest/edge:      2.6.4-tpaw0 2017-05-17 (2) 111MB -

Electrum is no Bitcoin client (wrong in summary), it's a Bitcoin wallet and talks to an Electrum server and not to other Bitcoin nodes directly.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
I hope you didn't install the snap version from Ubuntu's app store, did you?
Is this the version Snapcraft suggests when running snap install electrum? Last time updated May 2017? Have they gone nuts? Any version prior 3.4 is vulnerable to receiving arbitrary messages (phishing) and is strongly recommended to avoid.

By the way, snap is supposed to handle the signature verification part itself, even though I do agree that you should manually verify it with gpg --verify.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
How do I obtain Electrum through an Appimage as suggested? I think Electrum with KeepKey support is broken for Ubuntu 24.04 unfortunately.
How did you install Electrum on your Ubuntu LTS 24.04? I hope you didn't install the snap version from Ubuntu's app store, did you?

On Electrum's download page https://www.electrum.org/#download there are links to the Appimage version and how to verify it.

Always verify that you have a genuine Electrum download!
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
-snip- or python3 error.
I'm curious which python3 error that you're getting when trying to install keepkey.

I wonder whether it is an error that arises when installing the package via pip (in which case the error message would give us a clue as to what is going on) OR if this is an error that is caused when you run Electrum and it shows some exception with a stack trace on the console - the latter of which is rare but it would technically mean that there is an application bug.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
How do I obtain Electrum through an Appimage as suggested? I think Electrum with KeepKey support is broken for Ubuntu 24.04 unfortunately. Thanks to all those that have helped.
Get it from Electrum's official website and verify the AppImage with the provided signature file.
Link: https://electrum.org/#download

Then, use any search engine to know how to run an AppImage; two steps, you'll only need to set it as executable then run it.
It contains "keepkepctl" so it wont be a problem if you can't install python-keepkey to your machine.

-snip- or python3 error.
I'm curious which python3 error that you're getting when trying to install keepkey.
newbie
Activity: 3
Merit: 1
Regrettably, nothing worked. Always getting externally managed environment error or python3 error. How do I obtain Electrum through an Appimage as suggested? I think Electrum with KeepKey support is broken for Ubuntu 24.04 unfortunately. Thanks to all those that have helped.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
  • Also make sure that PyQt5 is installed in the directory C:\Users\PC_NAME\AppData\Local\Programs\Python\Python37-32\Scripts> if not install using 'pip install PyQt5'

OP doesn't use Windows and Electrum these days require Python 3.8 or newer.

Am I missing a repository perhaps, or has keepkey now been deprecated by Ubuntu 24.04? Thanks for your help!

I think it's not exist on Ubuntu 24.04. If you search "keepkey" on https://packages.ubuntu.com/ for "noble" distribution (name of Ubuntu 24.04), it leads to no result. If you want to avoid headache, you should consider using AppImage which supposed to include all dependency (including hardware wallet support).
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
You need to use the --user flag when you install stuff using Pip on Ubuntu and Debian without a virtualenv, otherwise you get the above error. So

Code:
pip install --user keepkey

But aside from that, this will only help if you Electrum is downloaded as a python package and not as an appimage or anything packaged like that. I assume that's how you installed it though, so I think you should open your file manager, look for the folder where you downloaded and unzipped Electrum to (if you didn't unzip it, you should do so now), and locate the file contrib/requirements/requirements-hw.txt. And install everything in it just to be on the safe side:

Code:
hidapi

# device plugin: trezor
trezor[hidapi]>=0.13.0,<0.14

# device plugin: safe_t
safet>=0.1.5

# device plugin: keepkey
keepkey>=6.3.1

# device plugin: ledger
# note: btchip-python only needed for "legacy" protocol and HW.1 support
# note: ledger-bitcoin==0.2.2 added new deps we don't want to bundle. otherwise it should be ok to use.
#       see https://github.com/LedgerHQ/app-bitcoin-new/issues/192
btchip-python>=0.1.32
ledger-bitcoin>=0.2.0,<0.2.2
hidapi

# device plugin: coldcard
ckcc-protocol>=0.7.7

# device plugin: bitbox02
bitbox02>=6.2.0

# device plugin: jade
cbor>=1.0.0,<2.0.0
pyserial>=3.5.0,<4.0.0

# prefer older protobuf (see #7922)
# (pulled in via e.g. keepkey and bitbox02)
protobuf>=3.20,<4

# prefer older colorama to avoid needing hatchling
# (pulled in via trezor -> click -> colorama)
# (pulled in via safet -> click -> colorama)
colorama<0.4.6
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
$ pip install keepkey
error: externally-managed-environment
Try this with: $ python3 -m pip install keepkey

If the suggestion to install keepkey library doesn't work and if you're using ".tar.gz" package while haven't installed the dependencies,
try the alternative option listed in Electrum's GitHub Repo: https://github.com/spesmilo/electrum
newbie
Activity: 3
Merit: 1
Unfortunately, there is an error related to externally managed environments. Kindly see below.

$ pip install keepkey
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

When I try the proposed solution, this happens:

$ sudo apt install python3-keepkey
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3-keepkey

Am I missing a repository perhaps, or has keepkey now been deprecated by Ubuntu 24.04? Thanks for your help!
sr. member
Activity: 2520
Merit: 280
Hire Bitcointalk Camp. Manager @ r7promotions.com
At this point I received the following error: No module named keepkeylib.qt.pinmatrix.


This means the system can't find the Keepkey Library directory.

  • Install Keepkey library using pip install keepkey 'pip install keepkey'
  • Also make sure that PyQt5 is installed in the directory C:\Users\PC_NAME\AppData\Local\Programs\Python\Python37-32\Scripts> if not install using 'pip install PyQt5'

Now run Electrum and repeat what you did earlier which should resolve your issue.
newbie
Activity: 3
Merit: 1
Hello Community!

I have been struggling with this error and googling did not bring anything that I can understand. I have installed Electrum successfully into a fresh Ubuntu installation (24.04). The program runs well when starting it up. I have a preexisting Electrum wallet that it is not corrupted given it works on another computer without issue. The wallet is an Electrum hardware wallet connected to a KeepKey. The steps I am following are: Restore a wallet or import keys / Hardware wallet / Use a device you have already set up / KeepKey wallet. At this point I received the following error: No module named keepkeylib.qt.pinmatrix.

Only option presented is OK. After pressing the button, Electrum shuts down. How to resolve this situation? I´d be very thankful to whomever can assist me. Thank you!!

Jump to: