Bitcoin Forum
April 27, 2024, 09:19:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Python installation of Electrum on latest Linux kernel (6.0 and above)  (Read 209 times)
DireWolfM14 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2170
Merit: 4237


Join the world-leading crypto sportsbook NOW!


View Profile WWW
June 19, 2023, 09:11:29 PM
Last edit: November 18, 2023, 03:52:36 PM by DireWolfM14
Merited by ABCbits (7), LoyceV (6), pooya87 (5), hugeblack (5), Pmalek (3), JayJuanGee (1), DdmrDdmr (1), logfiles (1), NotATether (1), Cricktor (1)
 #1

I don't know about the rest of you, but I prefer to install Electrum on my Linux machines using the python package tarball.  I recently installed Debian 12 Bookworm on one of my laptops, but was surprised to find an error when attempting to install Electrum.  More info on the error and resolution can be found in the issue I submitted on Github.

It appears that Debian isn't the only OS with changes that broke the python installation instructions found on Electrum's website.  Another, earlier issue was reported in regards to Ubuntu 23.

Below are the instructions on how to install the Python version of Electrum on newer Linux distros with kernel versions of 6.0 and above.  If you have previously used this method to install Electrum and you want to upgrade to a newer version, only steps 4 through 6 are required, and optionally, step 9 to clean up.  Make sure to substitute the file names for the desired package.

1. Perform an update.
Code:
sudo apt update

2. Install the required dependencies:
Code:
sudo apt install -y libsecp256k1-dev python3.11-venv python3-pyqt5

3. Create the environment folder for Electrum:
Code:
sudo python3 -m venv --system-site-packages /opt/electrum

4. From the user home directory (not important, but cleaner) download the required package and signature files:
Code:
wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz.asc

5. Verify the package (more info here):
Code:
gpg --verify Electrum-4.4.6.tar.gz.asc

6. From the same directory where you downloaded the tarball you can now install Electrum with this command:
Code:
sudo /opt/electrum/bin/pip install Electrum-4.4.6.tar.gz

7. A symlink to the binary is needed for the app drawer launcher and to simplify CLI commands:
Code:
sudo ln -s /opt/electrum/bin/electrum /usr/bin/electrum

8. Create the app drawer launcher file, "electrum.desktop," and update it's link to the icon image location:
Code:
sudo desktop-file-install /opt/electrum/share/applications/electrum.desktop | sudo sed -i -e 's+Icon=electrum+Icon=/opt/electrum/share/icons/hicolor/128x128/apps/electrum.png+' /usr/share/applications/electrum.desktop

9. Clean up by removing unneeded files:
Code:
rm Electrum-4.4.6.tar.gz Electrum-4.4.6.tar.gz.asc

And that's it.  You should find the Electrum icon in your app drawer or applications list, and it should start Electrum without any issues.  You should also be able to interact with Electrum using the CLI commands.




**Note: If you have previously used this method to install Electrum and you want to upgrade to a newer version, only steps 4 through 6 are required, and optionally, step 9 to clean up.  Make sure to substitute the file names for the desired package.




  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
1714252780
Hero Member
*
Offline Offline

Posts: 1714252780

View Profile Personal Message (Offline)

Ignore
1714252780
Reply with quote  #2

1714252780
Report to moderator
1714252780
Hero Member
*
Offline Offline

Posts: 1714252780

View Profile Personal Message (Offline)

Ignore
1714252780
Reply with quote  #2

1714252780
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714252780
Hero Member
*
Offline Offline

Posts: 1714252780

View Profile Personal Message (Offline)

Ignore
1714252780
Reply with quote  #2

1714252780
Report to moderator
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6695


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 20, 2023, 12:08:36 PM
 #2

Very good method that also happens to be very similar to the one I use - the only difference is that I install libsecp256k1 dependencies from APT. Although PyPI also redistributes the compiled wheels for it, so there's no LD_LIBRARY_PATH headaches with these instructions either.

PS: --user option to PIP was always a dirty hack, you can only make one "user" environment per user obviously, however you can have unlimited venvs.

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

Activity: 1960
Merit: 1639


Top Crypto Casino


View Profile WWW
June 20, 2023, 11:46:24 PM
 #3

I also had a similar issue when installing Electrum on them latest Ubuntu 23.04 (Lunar Lobster). The icon that was on the app draw was non-responsive. Not having enough technical knowledge about how to go around this. I just gave up and instead opted for the Appimage file that I could run whenever I wanted to access my wallet.

I will try out the new guide and see how it goes.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
logfiles
Copper Member
Legendary
*
Offline Offline

Activity: 1960
Merit: 1639


Top Crypto Casino


View Profile WWW
June 26, 2023, 11:40:38 PM
Merited by hugeblack (1), DireWolfM14 (1)
 #4

Update:

I followed all the steps, and now I can now open my electrum normally using the icon from the application list. Thanks   Smiley

Do you think this instruction will be added under the Linux installation guide?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
DireWolfM14 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2170
Merit: 4237


Join the world-leading crypto sportsbook NOW!


View Profile WWW
June 27, 2023, 12:44:17 AM
Last edit: June 27, 2023, 01:33:39 AM by DireWolfM14
Merited by ABCbits (1), hugeblack (1), logfiles (1)
 #5

Do you think this instruction will be added under the Linux installation guide?

I don't think so.  Odds are the dev team will tweak the python package to automatically create the launcher and register the binary in PATH, but I imagine they'll change the instructions on the Electrum website by replacing pip with venv.

Glad to hear that you were able to use my instructions successfully.  As you can see I wrote the instructions with version 4.4.4 in mind, and when 4.4.5 came out I was able to upgrade without issue also.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
DireWolfM14 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2170
Merit: 4237


Join the world-leading crypto sportsbook NOW!


View Profile WWW
August 26, 2023, 04:47:12 PM
Last edit: August 26, 2023, 07:09:13 PM by DireWolfM14
Merited by JayJuanGee (1), logfiles (1)
 #6

I decided to update these instructions to include the latest version of Electrum due to a significant security update in version 4.4.6.  I also decided to make the instructions easier on those who prefer to remain logged in as mere mortals, and I noticed that libsecp256k1-dev is required on a fresh OS.  I neglected to notice when I came up with this method because I had already installed libsecp256k1-dev when I tried the old method first.

  • Added "sudo" to the commands that require elevated privileges
  • Added "libsecp256k1-dev" to the required dependencies
  • Leveraged the included desktop file instead of creating a new one
  • Added instructions to clean unneeded files
  • Highlighted instructions for upgrades


  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
l8orre
Legendary
*
Offline Offline

Activity: 1181
Merit: 1018


View Profile
September 02, 2023, 01:21:33 AM
Merited by JayJuanGee (1)
 #7


I have been using electrum python (old 3.x.y version) and Appimage on Linux, lately the Appimage of 4.1.2

As 4.1.2 is getting a bit old too, maybe I should update to a more recent version.

However, I am concerned with security, and having python code would allow me to read it.

I know quite a bit of python, but I am no networking Guru- is there maybe a collection of suspicious code fragments to search for in the python code?

This seems esp. important because a malware would be hidden in some otherwise networking unrelated module and be called from some unconspicuous function for obfuscation.
 
Like, the typical routines a malware would use, like establishing network connections other than to the electrum servers etc.?  
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6695


bitcoincleanup.com / bitmixlist.org


View Profile WWW
September 05, 2023, 07:41:51 AM
Merited by JayJuanGee (1), DireWolfM14 (1)
 #8


I have been using electrum python (old 3.x.y version) and Appimage on Linux, lately the Appimage of 4.1.2

As 4.1.2 is getting a bit old too, maybe I should update to a more recent version.

However, I am concerned with security, and having python code would allow me to read it.

I know quite a bit of python, but I am no networking Guru- is there maybe a collection of suspicious code fragments to search for in the python code?

This seems esp. important because a malware would be hidden in some otherwise networking unrelated module and be called from some unconspicuous function for obfuscation.
 
Like, the typical routines a malware would use, like establishing network connections other than to the electrum servers etc.?  

The AppImage is just an archive containing all the binaries and libraries and other supporting files zipped together in one large format. You can extract it by opening the terminal and typing the name and path of the AppImage following by --appimage-extract and there should be some folder in /tmp created where you can see all the Python sources contained inside site_packages.

Any of these alternate methods can be used to unzip the appimage too: https://superuser.com/questions/1301583/how-can-i-extract-files-from-an-appimage

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!