Bitcoin Forum
November 12, 2024, 06:10:59 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Program doesn't start from application menu in Centos 7  (Read 584 times)
devplan (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 08, 2016, 08:25:27 PM
 #1

Not sure if this is the proper place to ask since my problem might be an issue with Centos 7.
I installed the Electrum client with the python-pip method and it created also a program item in my application menu.
However - when I click on it, nothing happens.
When I type electrum in a terminal window it says:
Code:
$ electrum
Traceback (most recent call last):
  File "/usr/bin/electrum", line 75, in <module>
    check_imports()
  File "/usr/bin/electrum", line 60, in check_imports
    from google.protobuf import descriptor
ImportError: cannot import name descriptor
Only when I type:
Code:
python /home/user/Electrum/Electrum-2.7.2/electrum 
it launches successfuly the Electrum client.
Re-installation doesn't resolve the issue.
Any thoughts?

rgds, Michael
Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
October 09, 2016, 05:52:52 PM
 #2

maybe you have more than one python version on your system.

First:

Code:
head `which electrum`|grep '#\!'|tr -d '#!'

It should output something like /usr/bin/python. Then run the following (replace /usr/bin/python with the path from the last command)

Code:
/usr/bin/python -V 
python -V
which python

Post the output of the above 3 commands

ThomasV
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
October 10, 2016, 10:27:08 AM
 #3

maybe centos has an incomplete versino of protobuf?

Electrum: the convenience of a web wallet, without the risks
Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
October 10, 2016, 10:58:46 AM
 #4

Please do post the output of
Code:
which electrum
devplan (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 16, 2016, 12:27:11 PM
 #5

Here is the output:
Code:
$ head `which electrum`|grep '#\!'|tr -d '#!'
/usr/bin/python

Code:
$ which electrum
/usr/bin/electrum

Code:
$ /usr/bin/python -V
Python 2.7.5
Code:
$ which python
/usr/bin/python

When I run electrum as root in a terminal, it starts but not as user.
Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
October 17, 2016, 12:10:29 PM
Last edit: October 17, 2016, 12:20:52 PM by Abdussamad
 #6

Here is the output:
Code:
$ head `which electrum`|grep '#\!'|tr -d '#!'
/usr/bin/python

Code:
$ which electrum
/usr/bin/electrum

Code:
$ /usr/bin/python -V
Python 2.7.5
Code:
$ which python
/usr/bin/python

When I run electrum as root in a terminal, it starts but not as user.

So you've installed electrum twice. Once in /usr/bin/electrum and once in your home folder.

Edit: I think it would be best if you removed the version of electrum in your home folder and reinstalled it as root. So as root download the tarball from the electrum site, verify the GPG sigs and run install again:

Code:
version="2.7.8"
wget https://download.electrum.org/$version/Electrum-$version.tar.{gz,gz.asc} https://github.com/spesmilo/electrum/raw/master/pubkeys/ThomasV.asc
gpg --import ThomasV.asc
gpg --verify Electrum-$version.tar.{gz.asc,gz}

Once the download is verified ("Good signature"), install it:

Code:
pip2 install Electrum-$version.tar.gz

Remove the version in your home folder:

Code:
rm -rf /home/user/Electrum/Electrum-2.7.2
devplan (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 17, 2016, 06:53:57 PM
 #7

Did all these steps (had already removed the home version earlier) but still exact the same result.
Code:
# pip2 install Electrum-2.7.2.tar.gz
You are using pip version 7.0.3, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Processing ./Electrum-2.7.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): slowaes>=0.1a1 in /usr/lib/python2.7/site-packages/slowaes-0.1a1-py2.7.egg (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.9 in /usr/lib/python2.7/site-packages (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): pbkdf2 in /usr/lib/python2.7/site-packages/pbkdf2-1.3-py2.7.egg (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/site-packages/requests-2.11.1-py2.7.egg (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): qrcode in /usr/lib/python2.7/site-packages (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): protobuf in /usr/lib/python2.7/site-packages/protobuf-3.1.0.post1-py2.7.egg (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): dnspython in /usr/lib/python2.7/site-packages (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): jsonrpclib in /usr/lib/python2.7/site-packages/jsonrpclib-0.1.7-py2.7.egg (from Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/site-packages (from qrcode->Electrum==2.7.2)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages (from protobuf->Electrum==2.7.2)
Installing collected packages: Electrum
  Running setup.py install for Electrum
Successfully installed Electrum-2.7.2

The pip2 install also placed a menu item "Electrum Bitcoin Wallet" in my launcher, i.e. /usr/share/applications/electrum.desktop but when I click on it, nothing appears.
When I run electrum as user in a terminal, I get:
Code:
$ electrum
Traceback (most recent call last):
  File "/usr/bin/electrum", line 75, in <module>
    check_imports()
  File "/usr/bin/electrum", line 60, in check_imports
    from google.protobuf import descriptor
ImportError: cannot import name descriptor


When I run electrum in a root terminal - it starts.

How could I allow user (myself) to launch Electrum from my menu launcher?

rgds, Michael
Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
October 17, 2016, 07:01:00 PM
 #8

So you can run it as root but not as an unprivileged user? Is that correct? Does it work when you type electrum in a terminal as an unprivileged user? If yes then the problem is simply with the launcher shortcut. Otherwise if you can't run it at all as an unprivileged user then it looks like a permissions problem.

Try uninstalling electrum and protobuf. Then reinstall electrum. It'll pull in protobuf anew and perhaps that'll fix it.

If this doesn't work then uninstall electrum as root. Then reinstall it as an unprivileged user in your home directory. You can simply place a link to the binary in your home directory and use it that way.
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!