If I emerge electrum with USE=-qt4, I get an error because it still depends on the python qt module: $ electrum Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/electrum", line 190, in <module> gui = __import__('electrum_gui.' + gui_name, fromlist=['electrum_gui']) ImportError: No module named qt
The issue is caused by this line in the electrum main script: if cmd == 'gui': gui_name = config.get('gui', 'classic') if gui_name in ['lite', 'classic']: gui_name = 'qt' I guess, when using -qt, the default for the gui should be "gtk" instead of "classic". if gtk is deactivated as well, we should probably fall back to "text". Work-around: specify --gui=gtk on the command line.
(In reply to mephinet from comment #1) > Work-around: specify --gui=gtk on the command line. Doesn't work for me: $ electrum --gui=gtk Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/electrum", line 190, in <module> gui = __import__('electrum_gui.' + gui_name, fromlist=['electrum_gui']) File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 23, in <module> import gi ImportError: No module named gi
(In reply to throw_away_2002 from comment #2) It's because you do not have installed dev-python/pygobject:3. THe ebuild needs to be fixed since electrum switched to GTK3.
So you are saying that gtk+3 is required, even though it installs fine (but doesn't run) with gtk+2 (no gtk+3 on the machine at all)? So do I need gkt+3 or pygobject:3 or both?
(In reply to throw_away_2002 from comment #4) > So do I need gkt+3 or pygobject:3 or both? Actually you need both. There are wrong dependencies in the ebuild.
I have not had time to give electrum any love. Does someone have a patch for this?
Created attachment 387712 [details, diff] electrum-1.9.8.ebuild.patch (In reply to Anthony Basile from comment #6) Here you are :)
(In reply to Eternal Sorrow from comment #7) > Created attachment 387712 [details, diff] [details, diff] > electrum-1.9.8.ebuild.patch > > (In reply to Anthony Basile from comment #6) > Here you are :) This didn't help me.
(In reply to mephinet from comment #1) > Work-around: specify --gui=gtk on the command line. Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/electrum", line 204, in <module> gui.main(url) File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1310, in main action = self.restore_or_create() File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1351, in restore_or_create return restore_create_dialog() File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 90, in restore_create_dialog flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.NO_SEPARATOR, AttributeError: type object 'GtkDialogFlags' has no attribute 'NO_SEPARATOR'
Created attachment 393468 [details, diff] My modified diff against electrum-1.9.8 I fixed the spaces and added a patch which helped me with my gtk+-3.12.2.
Created attachment 393470 [details, diff] electrum-1.9.8-gtk.patch Gtk version requires clarification. With my 3.12.2 I had the error shown in Comment 9.
(In reply to Dmitri Bogomolov from comment #11) > Created attachment 393470 [details, diff] [details, diff] > electrum-1.9.8-gtk.patch > > Gtk version requires clarification. With my 3.12.2 I had the error shown in > Comment 9. I've been waiting for upstream's next release but this isn't going to happen anytime soon. @everyone, are Dmitri's patches working for you? If so, I'll just apply. @Dmitri. FYI, those patches won't apply cleanly anymore because of a fix to 1.9.8. I can clean them up at my end, but you may want to know for yourself and others, eg, if you putting them in your /etc/portage/patches directory.
Fixed this in the overlay.
This should be fixed with 1.9.8-r1. Please test and reopen if there's a problem.
I have the same problem with net-misc/electrum-2.1.1: $ electrum -o -g qt Error: Cannot read config file. Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/electrum", line 234, in <module> gui = __import__('electrum_gui.' + gui_name, fromlist=['electrum_gui']) File "/usr/lib64/python2.7/site-packages/electrum_gui/qt/__init__.py", line 33, in <module> from PyQt4.QtGui import * ImportError: No module named QtGui # equery uses electrum | grep '+' +cli +fiat +linguas_ru_RU +ncurses +python_targets_python2_7 +qt4
And with gtk3 instead of qt4 it is launching OK.