Author

Topic: Electrum-4.1.4 Installation from Python sources doesn't work (Read 191 times)

HCP
legendary
Activity: 2086
Merit: 4361
Back to my original question, are these both commands python3 -m pip install --user & sudo pip3 do the same thing?
 python3 and pip3 are the same? are they both for installing Electrum-4.1.4.tar.gz, just one does it for all users, the other for only one sudo user?
And since the second command works for me, can i continue using Electrum installed that way, without compromising security or privacy? Will it work without conflicts with a setup i am planning to do: Core+Tor+Electrum+EPS+Trezor?
In terms of security... No.

In terms of privacy... it means that any user of the system could potentially tell that Electrum is installed (ie. the system might be being used for bitcoin etc). Whether that is a major concern will likely depend on whether it is a shared system.

Otherwise, if the sudo command is working, and you can run Electrum (and the potential privacy issue isn't an issue for you) then I wouldn't be too concerned about it.
legendary
Activity: 3682
Merit: 1580
sudo pip3 install does a system wide installation while python3 -m pip install --user only installs it for the current user.

I did not run purge command, i am afraid to purge something because i dont know how to reinstall after that.

you would use the same apt install command you originally did.

unless you have trouble starting electrum i would just leave it be.
jr. member
Activity: 45
Merit: 17
You should see one of the paths being /usr/lib/python3/dist-packages, navigate there and check if the dependencies are present. You can also try to purge the modules if needed: apt-get purge python3-pyqt5.

I dont have the exact same path as you mentioned, i get this output:
['', '/usr/local/lib/python39.zip',   '/usr/local/lib/python3.9',   '/usr/local/lib/python3.9/lib-dynload', 
 '/home/mint/.local/lib/python3.9/site-packages',  '/usr/local/lib/python3.9/site-packages']


But i went to /usr/lib/python3/ and there was a dist-packages folder with many other sub folders,

I also went to  /usr/local/lib there i have 2 phython folders, phython3.8 & phython 3.9. In the first one i have only dist-packages folder with many other sub folders, in the second one there are many folders but no dist-packages folder.

In /home/mint/.local/lib/python3.9 i again have phythob 3.8 & 3.9 but there i have only site-packages folder with many other subfolders.

I did not run purge command, i am afraid to purge something because i dont know how to reinstall after that. As you can guess by my messages i am unfamiliar with all these Linux commands and values.
I guess will just use Electrum the way i managed to setup.

Thanks a lot for your time

 
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
i get this:
mint@amint:~/.local/bin$ ./electrum
Error: at least one of ('pycryptodomex', 'cryptography') needs to be installed.

Then i run this to install pycryptodomex
$ sudo apt-get install build-essential python3-dev
$ pip install pycryptodomex

 and this
$ pip install pycryptodome
The first command on the installation page installs python-cryptography which is the main dependency for Electrum. Pycryptodome isn't a requirement.

Back to my original question, are these both commands python3 -m pip install --user & sudo pip3 do the same thing?
Yes. They're the same, except --user installs it for the current user that is running the command in the terminal.
python3 and pip3 are the same?
No. pip3 is the package installer for python3. The other command also calls pip as well.



And since the second command works for me, can i continue using Electrum installed that way, without compromising security or privacy? Will it work without conflicts with a setup i am planning to do: Core+Tor+Electrum+EPS+Trezor?
Yes.

After many attempts installing and uninstalling electrum, then isntalling and updating python3, pip, pycryptodomex, pycryptodome and few others something happened to pyqt5. Before i could run Electrum without installing, just running it with command python3 Electrum-4.1.4/run_electrum
Now i get errors: ModuleNotFoundError: No module named 'PyQt5', Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5

Though i have latest Python 3.9.6  and ppip 21.1.3, and when i do as it says in error and run sudo apt-get install python3-pyqt5 i see that i already have it: python3-pyqt5 is already the newest version (5.14.1+dfsg-3build1),0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
.

Might be an issue with the pythonpath or the module itself.

To check for paths, pass
Code:
python3
in the terminal to open up the python shell:
Code:
>>> import sys
>>> print(sys.path)
>>> exit()

You should see one of the paths being /usr/lib/python3/dist-packages, navigate there and check if the dependencies are present. You can also try to purge the modules if needed: apt-get purge python3-pyqt5.

I've been trying to replicate the issue with my own Linux Mint 20.10 but I can't replicate it at all. The commands listed are all working just fine. I'd say, if your current shortcut with the other installation guide works, then it is fine as well. As long as you can backup your seeds, then there shouldn't be a problem.
jr. member
Activity: 45
Merit: 17
You have to restart your Ubuntu after the first pip installation for the path variables to take effect. I reproduced this with 21.04 and found Electrum to be correctly installed in ~/.local/bin but you can't execute it in terminal without first navigating to that. Restarting Ubuntu after the installation fixes this.

I just installed Python 3.9.6 (its was 3.8 before) restarted then installed Electrum again running this command python3 -m pip install --user Electrum-4.1.4.tar.gz it creates electrum file in ~/.local/bin, when i open terminal from this folder and run ./electrum i get this:
mint@amint:~/.local/bin$ ./electrum
Error: at least one of ('pycryptodomex', 'cryptography') needs to be installed.

Then i run this to install pycryptodomex
$ sudo apt-get install build-essential python3-dev
$ pip install pycryptodomex

 and this
$ pip install pycryptodome

But running a test python3 -m Cryptodome.SelfTest tells me this:
int@amint:~/.local/bin$ python3 -m Cryptodome.SelfTest
/usr/local/bin/python3: Error while finding module specification for 'Cryptodome.SelfTest' (ModuleNotFoundError: No module named 'Cryptodome')

So installing with Electrum`s official code python3 -m pip install --user Electrum-4.1.4.tar.gz creates Electrum file in ~/.local/bin which i cant use to launch Electrum.
But as i mentioned in my first post when i run this code sudo pip3 install Electrum-4.1.4.tar.gz it creates Electrum file in /usr/local/bin and when i insert it`s path in to desktop icon it launches Electrum wallet.

Back to my original question, are these both commands python3 -m pip install --user & sudo pip3 do the same thing?
 python3 and pip3 are the same? are they both for installing Electrum-4.1.4.tar.gz, just one does it for all users, the other for only one sudo user?
And since the second command works for me, can i continue using Electrum installed that way, without compromising security or privacy? Will it work without conflicts with a setup i am planning to do: Core+Tor+Electrum+EPS+Trezor?


update
After many attempts installing and uninstalling electrum, then isntalling and updating python3, pip, pycryptodomex, pycryptodome and few others something happened to pyqt5. Before i could run Electrum without installing, just running it with command python3 Electrum-4.1.4/run_electrum
Now i get errors: ModuleNotFoundError: No module named 'PyQt5', Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5

Though i have latest Python 3.9.6  and ppip 21.1.3, and when i do as it says in error and run sudo apt-get install python3-pyqt5 i see that i already have it: python3-pyqt5 is already the newest version (5.14.1+dfsg-3build1),0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
.

legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
I run the command the exact way it was in Electrum`s instructions, python3 -m pip install
So basically these both commands python3 -m pip install --user & sudo pip3 do the same thing?
 python3 and pip3 are the same, they both are installing Electrum-4.1.4.tar.gz, just one does it for all users, the other for only one user? did i get it right?
If so then why the fist command from Electrum`s website doesnt work form me? even if it installs for other users how come i dont have acccess to it? I am the only one user on my laptop.
As i mentioned i am very new to Linux, can do things only if i have detailed instructions,
Oh, I think I got what's going on.

You have to restart your Ubuntu OS after the first pip installation for the path variables to take effect. I reproduced this with 21.04 and found Electrum to be correctly installed in ~/.local/bin but you can't execute it in terminal without first navigating to that. Restarting Ubuntu after the installation fixes this. Weird, I've never had this problem with the older Ubuntu or other Linux distributions.
If so then why the fist command from Electrum`s website doesnt work form me? even if it installs for other users how come i dont have acccess to it? I am the only one user on my laptop.
As i mentioned i am very new to Linux, can do things only if i have detailed instructions,
The reason why you're able to launch Electrum through the link you've followed is that you're directly executing Electrum. The icon that is created directly points to the Electrum that is installed for all users using pip. You could've used Electrum if you were to restart your computer and use terminal to launch electrum (by typing electrum in the terminal). pip doesn't create icons, so you're supposed to be executing through the terminal but in the guide you've linked, you're creating your own shortcut.

jr. member
Activity: 45
Merit: 17
Were you using a privileged command line or did you run it with sudo?

I run the command the exact way it was in Electrum`s instructions, python3 -m pip install
So basically these both commands python3 -m pip install --user & sudo pip3 do the same thing?
 python3 and pip3 are the same, they both are installing Electrum-4.1.4.tar.gz, just one does it for all users, the other for only one user? did i get it right?
If so then why the fist command from Electrum`s website doesnt work form me? even if it installs for other users how come i dont have acccess to it? I am the only one user on my laptop.
As i mentioned i am very new to Linux, can do things only if i have detailed instructions,
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
--user flag installs Electrum for the user that ran the command. Were you using a privileged command line or did you run it with sudo?

Installing it with sudo (and without --user) will install Electrum for all of the users within the system. There isn't really any privacy or security risks, other than the other users will have Electrum installed as well.
jr. member
Activity: 45
Merit: 17
Hi

I just start using Linux (Mint 20.1 Cinnamon) i am newby in Linux and have no coding knowledge.
I went to electrum.org and followed instruction for Installation from Python sources. It works as Appimage and by running without installation but not installing from python as described below.

Code:
 1. Install dependencies:	sudo apt-get install python3-pyqt5 libsecp256k1-0 python3-cryptography
2. Download package: wget https://download.electrum.org/4.1.4/Electrum-4.1.4.tar.gz
3. Verify signatures: wget https://download.electrum.org/4.1.4/Electrum-4.1.4.tar.gz.ThomasV.asc
4. gpg --verify Electrum-4.1.4.tar.gz.ThomasV.asc Electrum-4.1.4.tar.gz
5. wget https://download.electrum.org/4.1.4/Electrum-4.1.4.tar.gz.sombernight_releasekey.asc
6. gpg --verify Electrum-4.1.4.tar.gz.sombernight_releasekey.asc Electrum-4.1.4.tar.gz
7. Run without installing: tar -xvf Electrum-4.1.4.tar.gz
8. python3 Electrum-4.1.4/run_electrum
9. Install with PIP: sudo apt-get install python3-setuptools python3-pip
10.python3 -m pip install --user Electrum-4.1.4.tar.gz

All commands go trough and i get a message in terminal saying installation was successful, but there is no electrum folder in local/bin 
and when i try to uninstall electrum  (sudo pip3 uninstall electrum) to start over, i get message saying that can not uninstall since electrum is not installed.

But when instead of last code
Code:
python3 -m pip install --user Electrum-4.1.4.tar.gz
i use this code
Code:
sudo pip3 install Electrum-4.1.4.tar.gz
it works, it creates electrum folder in local/bin and after creating desctop icon as it is described here https://www.addictivetips.com/ubuntu-linux-tips/install-electrum-on-linux/ i am able to launch Electrum.

I want to ask if its ok changing command "python3 -m pip install --user" to command "sudo pip3 install" ?
Can i continue using Electrum installed the way i did, dont i compromise security or privacy?


Jump to: