Author

Topic: Electrum on debian 12 (Read 153 times)

legendary
Activity: 2296
Merit: 2892
#SWGT CERTIK Audited
October 16, 2023, 05:36:13 AM
#12
-snip-
Also, if you want the application listed on the menu/desktop. Do the following as suggested by Electrum.

Install a related application for the purpose.
Code:
sudo apt install desktop-file-utils

Run this command to make it available in your menu.
Code:
sudo desktop-file-install ~/.local/share/applications/electrum.desktop

Thank you for the guide; I just tried it, and the result is that the Electrum application is already in the Menu.






One last question, I am slowly moving to Linux and I face some difficulties understanding those things. Which section is most appropriate for looking for help?

To discuss Linux, especially Debian, maybe you can join one of the forums from the Debian Linux user community here: https://forums.debian.net/


I rarely use Linux, and for testing certain software, I usually use Ubuntu Linux, such as when using Bitcoin Core:


-snip-

hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
October 13, 2023, 09:59:09 PM
#11
---

Oh dear, Thank you very much for your help.
I was able to install the latest version of Electrum as you can see in the picture below. I followed all the commands you have provided and I just copied and pasted them without even understanding what's happening. I created a thread a few days ago Here is why Bitcointalk is a reliable source!. Once again you guys proved why it is a reliable source. I doubt that if would open the same thread on different platforms, I don't think someone would constantly help and check back the replies that Bitcointalk users do. One last question, I am slowly moving to Linux and I face some difficulties understanding those things. Which section is most appropriate for looking for help?


legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
October 12, 2023, 07:44:52 AM
#10

It's basically saying; in order to make Python PIP work like it used to, add this argument to the end of the pip install:

Code:
--break-system-packages

Or put the following information inside the ~/.config/pip/pip.conf file so that you don't have to keep adding the switch at the end of each pip install command every time:

Code:
[global]
break-system-packages = true



Since you are not a programmer working with Python packages (I think?), you don't have to worry about using venv.
legendary
Activity: 1932
Merit: 1273
October 11, 2023, 11:48:51 PM
#9
Code:
error: externally-managed-environment

Make sure you remove the APT installation beforehand.

Code:
sudo apt remove electrum

Then, a dirty fix since you have installed the app from the repository, delete a file.

Code:
sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED

As addressed in the reference you have linked in the above post, that particular file (and the warning) exists to prevent Python-related library mismatches. It's not an ideal way, but I believe it should be safe for your current usage.

After you delete it, continue with the installation command.
Code:
python3 -m pip install --user Electrum-4.4.6.tar.gz



Also, if you want the application listed on the menu/desktop. Do the following as suggested by Electrum.

Install a related application for the purpose.
Code:
sudo apt install desktop-file-utils

Run this command to make it available in your menu.
Code:
sudo desktop-file-install ~/.local/share/applications/electrum.desktop
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
October 11, 2023, 07:36:06 PM
#8
I suggest instead of changing your system-wide installation sources, you better manually install Electrum with its own installation tutorial. Go to https://electrum.org/#download, on "Installation from Python sources" go ahead with "Install with PIP:"

Code:
sudo apt-get install python3-pyqt5 libsecp256k1-dev python3-cryptography python3-setuptools python3-pip
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz.asc
 gpg --verify Electrum-4.4.6.tar.gz.asc
 python3 -m pip install --user Electrum-4.4.6.tar.gz
-snip-

I don't know what's wrong with my system. But I always end up getting this error. See the image below, please.



If I understand correctly, the problem is with Python. I searched with this error message on the internet and I got a few results. One answer is "Your distribution is trying to protect you against mixing apt provided packages and pip provided packages. Mixing two package managers (apt and pip here) is always a bad idea and the source of many issues.

PEP 668 is a way for distributions to explicitly tell users to avoid falling into this pitfall. Your distribution told you three solutions in the message, but only the 2nd one applies cleanly to your use case"


    Using apt install python3-xxx. It does not cleanly apply for you as you're having a requirements.txt, not a single dependency. It would work if you have only a few requirements in the file and can do it manually for each, like apt install python3-xxx python3-yyy python3-zzz. In this case there's no weird mixing of package managers: you installed python3 using apt, you're installing your dependencies using apt: no surprises.
    Using a venv: python3 -m venv .venv then source .venv/bin/activate, then pip install -r requirements.txt. In this case the installation is contained inside the .venv directory: no mixing of what apt does and what pip does, no surprises.
    Using pipx which does not cleanly apply to your case, pipx is good to install and use a program, like pipx install black, but here you need to install libraries listed in a requirement file, not a program.

There's another way, that I often use myself because I often need multiple different Python versions:

    Use a Python not provided by your distribution, so it does not mess with apt installed things and does not adopt PEP 668. I often compile many Python interpreters myself using a short bash function which use a --prefix=~/.local/, for testing purposes. With those Pythons I use either a venv either a good old pip install, in this case pip will install it in ~/.local/, again no clash between apt and pip, no bad surprises.

[1]


Not sure If I understood anything.


[1] https://stackoverflow.com/questions/75602063/pip-install-r-requirements-txt-is-failing-this-environment-is-externally-mana


legendary
Activity: 2296
Merit: 2892
#SWGT CERTIK Audited
October 11, 2023, 09:31:14 AM
#7
I suggest instead of changing your system-wide installation sources, you better manually install Electrum with its own installation tutorial. Go to https://electrum.org/#download, on "Installation from Python sources" go ahead with "Install with PIP:"

Code:
sudo apt-get install python3-pyqt5 libsecp256k1-dev python3-cryptography python3-setuptools python3-pip
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz.asc
 gpg --verify Electrum-4.4.6.tar.gz.asc
 python3 -m pip install --user Electrum-4.4.6.tar.gz
-snip-

I tried to practice the following directly using Debian GNU Linux 11.3 using a virtual machine (Parallels Desktop):









After running the command above, Electrum still couldn't open via terminal, so I added some configuration as you suggested.







As seen above, I successfully installed Electrum 4.4.6 by opening it via the Terminal by typing 'electrum'.

Notes:
In the middle of the process, I was asked about Grub, but I continued installing Electrum by ignoring the Grub installation process.
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
October 11, 2023, 07:26:18 AM
#6
Have you tried running
Code:
sudo apt update
sudo apt upgrade
respectively?

That should install available upgrades of all packages currently installed on your system, including Electrum.

I tried this right now. I am still in an older version of Electrum.

Code:
sudo apt-get install python3-pyqt5 libsecp256k1-dev python3-cryptography python3-setuptools python3-pip
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz.asc
 gpg --verify Electrum-4.4.6.tar.gz.asc
 python3 -m pip install --user Electrum-4.4.6.tar.gz

Even though I tried this before, Now I tried it again and ended up with an error:

Code:
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.11/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.

-snip-
I can run the .Appimage which I downloaded from Electrum.org, but that does not install Electrum on my system. It just runs the software and does not create a desktop icon in the menu.
Have you tried installing Electrum from Python sources?

Yes, I did I got an error. Check the above, please. I got the same error.

As far as I remember, this is not only on Debian; even on Ubuntu software in 2020, the Electrum version listed there is also outdated.

This is interesting. I don't know how to check if the latest version is available on the Debian server or not. But, thanks for the confirmation. Thanks to vv181 as well. The version I am using is Electrum 4.3.4. If there is no security issue in this version, I am okay with it.
legendary
Activity: 2296
Merit: 2892
#SWGT CERTIK Audited
October 11, 2023, 04:34:08 AM
#5
-snip-
I can run the .Appimage which I downloaded from Electrum.org, but that does not install Electrum on my system. It just runs the software and does not create a desktop icon in the menu.
Have you tried installing Electrum from Python sources?


-snip- My best guess is that the deb.debian.org server does not have an updated version of Electrum yet. I could be wrong. If any Debian users are using an updated version of Electrum, they may confirm what is wrong.
As far as I remember, this is not only on Debian; even on Ubuntu software in 2020, the Electrum version listed there is also outdated.



Even though at that time, as far as I remember, the updated version had reached Electrum 3.3.8.
https://download.electrum.org/3.3.8/
legendary
Activity: 1932
Merit: 1273
October 11, 2023, 04:26:11 AM
#4
When you install software from the Debian repository, it does not always come up with the latest version. It adjusted with its own software release schedule. Any latest software usually comes first into testing/unstable categorisation, if already mature, the maintainer will move the specific version of the software into a stable release which will be readily available with apt install.

Debian repository does have the latest version of Electrum 4.4.6, but it hasn't yet on the stable release, so you need further configuration to install the latest version.

I suggest instead of changing your system-wide installation sources, you better manually install Electrum with its own installation tutorial. Go to https://electrum.org/#download, on "Installation from Python sources" go ahead with "Install with PIP:"

Code:
sudo apt-get install python3-pyqt5 libsecp256k1-dev python3-cryptography python3-setuptools python3-pip
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz
 wget https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz.asc
 gpg --verify Electrum-4.4.6.tar.gz.asc
 python3 -m pip install --user Electrum-4.4.6.tar.gz

If after running the above command, you type `electrum` on the terminal and it does not open up. You need to add up a few configurations.

Open bashrc file with nano or any text editor.
Code:
nano ~/.bashrc

On the last line of the file append

Code:
export PATH=~/.local/bin:$PATH

Save then exit. You should be able to run it now.
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
October 11, 2023, 03:47:48 AM
#3
Have you tried running
Code:
sudo apt update
sudo apt upgrade
respectively?

That should install available upgrades of all packages currently installed on your system, including Electrum.

If I remember correctly, yes I did. However, I am confused because I have installed Debian 12 a couple of times because I was unable to do a dual boot with Windows 10. This is the final, and I was able to dual-boot Debian 12 with Windows 10. I am currently logged in on my Windows system. I will try the commands once I get back to Linux and I will let you know about it. But, If I remember correctly, this did not help either. My best guess is that the deb.debian.org server does not have an updated version of Electrum yet. I could be wrong. If any Debian users are using an updated version of Electrum, they may confirm what is wrong.
legendary
Activity: 1624
Merit: 2594
Top Crypto Casino
October 11, 2023, 03:28:27 AM
#2
Hi there.

Recently I decided to move to the Linux operating system due to security reasons and I was excited about it. I never used the Linux operating system before so I do not have any experience. I was trying to install Electrum's latest version on my Operating system which is Debian 12. The problem is, that whenever I write a command in my terminal, it always installs a backdated version of Electrum in my system. The command I am using is
Code:
sudo apt install electrum

I should mention one thing. The selected mirror server is deb.debian.org

Have you tried running
Code:
sudo apt update
sudo apt upgrade
respectively?

That should install available upgrades of all packages currently installed on your system, including Electrum.
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
October 11, 2023, 01:59:41 AM
#1
Hi there.

Recently I decided to move to the Linux operating system due to security reasons and I was excited about it. I never used the Linux operating system before so I do not have any experience. I was trying to install Electrum's latest version on my Operating system which is Debian 12. The problem is, that whenever I write a command in my terminal, it always installs a backdated version of Electrum in my system. The command I am using is
Code:
sudo apt install electrum

I should mention one thing. The selected mirror server is deb.debian.org

I also tried to upgrade my package by applying this command
Code:
sudo -H pip3 install --upgrade https://download.electrum.org/4.4.6/Electrum-4.4.6.tar.gz#egg=electrum[fast]


and unfortunately, I get this error:

Code:
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.11/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.

I can run the .Appimage which I downloaded from Electrum.org, but that does not install Electrum on my system. It just runs the software and does not create a desktop icon in the menu.

Jump to: