Bitcoin Forum
June 19, 2024, 05:20:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum error: "No module named keepkeylib.qt.pinmatrix"  (Read 127 times)
alegoje (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
June 03, 2024, 06:41:21 PM
Merited by ABCbits (1)
 #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!!

jrrsparkles
Sr. Member
****
Offline Offline

Activity: 2436
Merit: 272


Eloncoin.org - Mars, here we come!


View Profile
June 03, 2024, 07:28:11 PM
 #2

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.









▄▄████████▄▄
▄▄████████████████▄▄
▄██
████████████████████▄
▄███
██████████████████████▄
▄████
███████████████████████▄
███████████████████████▄
█████████████████▄███████
████████████████▄███████▀
██████████▄▄███▄██████▀
████████▄████▄█████▀▀
██████▄██████████▀
███▄▄█████
███████▄
██▄██████████████
░▄██████████████▀
▄█████████████▀
████████████
███████████▀
███████▀▀
Mars,           
here we come!
▄▄███████▄▄
▄███████████████▄
▄███████████████████▄
▄██████████
███████████
▄███████████████████████▄
█████████████████████████
█████████████████████████
█████████████████████████
▀█
██████████████████████▀
▀██
███████████████████▀
▀███████████████████▀
▀█████████
██████▀
▀▀███████▀▀
ElonCoin.org.
████████▄▄███████▄▄
███████▄████████████▌
██████▐██▀███████▀▀██
███████████████████▐█▌
████▄▄▄▄▄▄▄▄▄▄██▄▄▄▄▄
███▐███▀▄█▄█▀▀█▄█▄▀
███████████████████
█████████████▄████
█████████▀░▄▄▄▄▄
███████▄█▄░▀█▄▄░▀
███▄██▄▀███▄█████▄▀
▄██████▄▀███████▀
████████▄▀████▀
█████▄▄
.
"I could either watch it
happen or be a part of it"

▬▬▬▬▬
alegoje (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
June 04, 2024, 12:46:06 AM
 #3

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!
nc50lc
Legendary
*
Offline Offline

Activity: 2450
Merit: 5720


Self-proclaimed Genius


View Profile
June 04, 2024, 06:24:59 AM
 #4

$ 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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1638
Merit: 6898


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 04, 2024, 08:34:14 AM
 #5

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

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 2912
Merit: 7565


Crypto Swap Exchange


View Profile
June 04, 2024, 09:24:47 AM
 #6

  • 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).

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
alegoje (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
June 04, 2024, 04:51:28 PM
 #7

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.
nc50lc
Legendary
*
Offline Offline

Activity: 2450
Merit: 5720


Self-proclaimed Genius


View Profile
June 05, 2024, 05:49:25 AM
 #8

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1638
Merit: 6898


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 06, 2024, 11:54:55 AM
 #9

-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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Cricktor
Legendary
*
Offline Offline

Activity: 798
Merit: 1159


Crypto Swap Exchange


View Profile
June 06, 2024, 12:34:34 PM
 #10

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!

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1554
Merit: 7566


Protocols over bureaucrats


View Profile
June 06, 2024, 06:33:34 PM
 #11

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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Cricktor
Legendary
*
Offline Offline

Activity: 798
Merit: 1159


Crypto Swap Exchange


View Profile
June 06, 2024, 07:43:08 PM
 #12

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:   snap@tpaw.org
links:
  contact:
    - mailto:snap@tpaw.org
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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!