Bitcoin Forum

Bitcoin => Electrum => Topic started by: beans99 on January 02, 2019, 08:04:57 PM



Title: Linux - error installing electrum 3.3.2
Post by: beans99 on January 02, 2019, 08:04:57 PM

I have been happily using electrum in my linux mint OS for some time but it has failed to receive a payment and gets stuck on 'Synchronising'. I have tried to upgrade electrum to version 3.3.2, but I get the following error messages:

The directory '/home/my idrectory/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/my idrectory/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled.

    Error: Electrum requires Python version >= 3.6.1...
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3246txsb/electrum/
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


I have tried the following:

- upgrading via pip install using 'pip install --upgrade pip' command.
- 'pip install --upgrade setuptools'
- 'pip install --upgrade setuptools --user python'

but I get the same error message.


I have tried:

sudo apt-get install python3.5-dev libmysqlclient-dev
sudo apt-get install python3-numpy

but get the same error message.

Would anyone have any ideas?

Thank you!


Title: Re: Linux - error installing electrum 3.3.2
Post by: jackg on January 02, 2019, 08:18:40 PM
What version of python are you running?

On Linux, you also need to run stuff as python3 and not python as python means python2.

Afaik lm follows the standard Linux so try using it as python3 first.

From electrum website, if that doesn't work:
Install dependencies:
sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
Install Electrum:
sudo python3 -m pip install https://download.electrum.org/3.3.2/Electrum-3.3.2.tar.gz#egg=electrum[fast]

https://electrum.org/#download



Check the file permissions on the pip folder also and chmod it if necessary.


Title: Re: Linux - error installing electrum 3.3.2
Post by: beans99 on January 02, 2019, 09:18:32 PM

Cheers Jack.

Yes, I installed python 3 with:

$ sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
[sudo] password for beans9:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-setuptools is already the newest version (20.7.0-1).
python3-pyqt5 is already the newest version (5.5.1+dfsg-3ubuntu4).
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
0 to upgrade, 0 to newly install, 0 to remove and 5 not to upgrade.


When I check the version of python with:

python3.6 -V

It reports:

Python 3.6.7

But it fails when installing electrum itself, ie:

sudo python3 -m pip install https://download.electrum.org/3.3.2/Electrum-3.3.2.tar.gz#egg=electrum[fast]

produces:

The directory '/home/my idrectory/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/my idrectory/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled.

    Error: Electrum requires Python version >= 3.6.1...
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3246txsb/electrum/
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.




When I try to upgrade pip with

sudo pip install --upgrade pip

I get this:

/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)

Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (18.1)


Note the references to python 2.7.

I don't know how to get past this.



Looking for 'python' folders in /usr/local/lib I have 'python3.6', but no files in there, which seems odd.



Title: Re: Linux - error installing electrum 3.3.2
Post by: jackg on January 02, 2019, 09:32:45 PM
Maybe you just can't see the files.
Do an ls -l on the parent directory of python 3.6 if there is no x in the second set of three then you can't see what's inside.

I think it's pip3 try this first change pip to pip3... 

Try going to /home/my idrectory/.cache/pip/http (you might have to be root to do it).
So:
CD /home/my idrectory/.cache/pip/http
Then
CD /home/my idrectory/.cache/pip/
Ls -l
Copy and paste the output, if it displays nothing, that's fine.
Then:
CD /home/my idrectory/.cache/pip/http
Ls -l



Title: Re: Linux - error installing electrum 3.3.2
Post by: Abdussamad on January 03, 2019, 08:00:43 AM
what is the output of:

Code:
python3 -V

Also instead of installing via pip3 I suggest simply downloading the tarball, checking the gpg sig (https://bitcoinelectrum.com/how-to-verify-your-electrum-download/) and then untarring it:

Code:
tar -xzvf Electrum-3.3.2.tar.gz

Then rename the new dir:

Code:
mv Electrum-3.3.2 electrum

Change to it and run electrum

Code:
cd electrum
./run_electrum

Create a link to run_electrum on your desktop for easy access.



Title: Re: Linux - error installing electrum 3.3.2
Post by: HCP on January 07, 2019, 11:03:49 PM
The directory '/home/my idrectory/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Possibly stating the obvious... but did you follow the suggestion in the error message and use "sudo -H..."? ???


Title: Re: Linux - error installing electrum 3.3.2
Post by: Awkward_Public_Stoner on January 14, 2019, 09:21:37 PM
Had exactly the same problem using Ubuntu 16.04. LTS Exact same error messages.

I tried to update python manually, tried to update pip, tried the 'sudo -H' ... nothing worked.

When I upgraded to Ubuntu 18.04. LTS the installation of Electrum 3.3.2 went smooth and without a problem. Probably it's the same problem in mint, the python version is outdated.

What mint version are you using?

Upgrade if possible.


Title: Re: Linux - error installing electrum 3.3.2
Post by: humbleschleem on January 16, 2019, 03:58:52 AM
I'm having the exact same problem trying to upgrade from 3.05 to 3.3.2 on Mint 18.1.


Title: Re: Linux - error installing electrum 3.3.2
Post by: elda34b on January 16, 2019, 10:58:37 AM
Had exactly the same problem using Ubuntu 16.04. LTS Exact same error messages.

I tried to update python manually, tried to update pip, tried the 'sudo -H' ... nothing worked.

When I upgraded to Ubuntu 18.04. LTS the installation of Electrum 3.3.2 went smooth and without a problem. Probably it's the same problem in mint, the python version is outdated.

Have you tried Abdussamad suggestion above? Instead of installing it, you can try to update phyton and then run Electrum directly after extracting it from the source code. Or are you trying to say that python couldn't be updated?

I'm having the exact same problem trying to upgrade from 3.05 to 3.3.2 on Mint 18.1.

What have you done to fix it? If you don't share enough details it is difficult to help you.


Title: Re: Linux - error installing electrum 3.3.2
Post by: jackg on January 16, 2019, 12:48:05 PM
Had exactly the same problem using Ubuntu 16.04. LTS Exact same error messages.

I tried to update python manually, tried to update pip, tried the 'sudo -H' ... nothing worked.

When I upgraded to Ubuntu 18.04. LTS the installation of Electrum 3.3.2 went smooth and without a problem. Probably it's the same problem in mint, the python version is outdated.

What mint version are you using?

Upgrade if possible.

Is it python3 and pip3 you've been trying to update also and not just regular python?

As said, look at abdusammads post too.


Title: Re: Linux - error installing electrum 3.3.2
Post by: Artemis3 on January 31, 2019, 12:26:15 PM
I have been happily using electrum in my linux mint OS for some time but it has failed to receive a payment and gets stuck on 'Synchronising'. I have tried to upgrade electrum to version 3.3.2, but I get the following error messages

I suggest you first upgrade your Python using a PPA:

If you’re using another version of Ubuntu (e.g. the latest LTS release), we recommend using the deadsnakes PPA (https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) to install Python 3.6:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.6

And then try running the binary again.

sudo pip install --upgrade pip

I get this:

/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)

Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (18.1)


Note the references to python 2.7.

I don't know how to get past this.

sudo pip3  etc...

When you use pip, it is common in many Linux distros to have both the pip for python2 and the pip for python3. Depending on distro you might have separate binaries (ie. pip2 or pip3). With Ubuntu (also Mint) this appears to be /usr/bin/pip3


Title: Re: Linux - error installing electrum 3.3.2
Post by: Awkward_Public_Stoner on February 01, 2019, 12:33:22 PM
Quote
Is it python3 and pip3 you've been trying to update also and not just regular python?

As said, look at abdusammads post too.

Sorry for delay, didn't see that one.

It was python3 and regular pip if I remember correctly.


Title: Re: Linux - error installing electrum 3.3.2
Post by: jackg on February 01, 2019, 01:32:16 PM
Quote
Is it python3 and pip3 you've been trying to update also and not just regular python?

As said, look at abdusammads post too.

Sorry for delay, didn't see that one.

It was python3 and regular pip if I remember correctly.

Regular pip refers to pip2, it may be that you don't have pip3 installed but you could always run python3 and type import pip to test this (although even the most basic Linux distros come with pip3).


Title: Re: Linux - error installing electrum 3.3.2
Post by: Artemis3 on February 03, 2019, 01:58:47 AM
Quote
Is it python3 and pip3 you've been trying to update also and not just regular python?

As said, look at abdusammads post too.

Sorry for delay, didn't see that one.

It was python3 and regular pip if I remember correctly.

Regular pip refers to pip2, it may be that you don't have pip3 installed but you could always run python3 and type import pip to test this (although even the most basic Linux distros come with pip3).

Actually some linux distros (https://www.archlinux.org/packages/extra/any/python-pip/) have it the other way around (https://www.archlinux.org/packages/extra/any/python2-pip/), pip is symlinked to v3 and you have to type pip2 to use the v2...

He should just use pip3 instead of pip to install the dependencies he thought he installed using pip (but actually pulled the v2 variants).