Title: Electrum-4.1.4 Installation from Python sources doesn't work Post by: curious droid on July 04, 2021, 12:24:50 PM 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 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 Code: sudo pip3 install Electrum-4.1.4.tar.gz 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? Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: ranochigo on July 04, 2021, 12:34:19 PM --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. Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: curious droid on July 04, 2021, 01:15:05 PM 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, Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: ranochigo on July 04, 2021, 03:22:28 PM I run the command the exact way it was in Electrum`s instructions, python3 -m pip install Oh, I think I got what's going on. 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, You have to restart your 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. 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.As i mentioned i am very new to Linux, can do things only if i have detailed instructions, Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: curious droid on July 04, 2021, 06:48:11 PM 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. . Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: ranochigo on July 05, 2021, 03:45:35 PM i get this: The first command on the installation page installs python-cryptography which is the main dependency for Electrum. Pycryptodome isn't a requirement.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 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 Might be an issue with the pythonpath or the module itself.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. . To check for paths, pass Code: python3 Code: >>> import sys 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. Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: curious droid on July 05, 2021, 05:00:53 PM 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 Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: Abdussamad on July 05, 2021, 07:19:00 PM 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. Title: Re: Electrum-4.1.4 Installation from Python sources doesn't work Post by: HCP on July 08, 2021, 05:20:00 AM Back to my original question, are these both commands python3 -m pip install --user & sudo pip3 do the same thing? In terms of security... No.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 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. |