qt problem?

12 views
Skip to first unread message

Paul Penczek

unread,
Mar 8, 2019, 3:51:13 PM3/8/19
to eman2-de...@googlegroups.com
Hi,

does anybody know why it would be happening? It was fine yesterday.


Thanks,

____________________
Pawel

bmbpccl1:/home/pawel 228> e2.py
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19)
Type "copyright", "credits" or "license" for more information.

IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Welcome to the interactive EMAN2 Python interface, provided by ipython

NOTE: that you should NOT be running this program if your intent is to run other
EMAN2 programs. To do that, quit e2.py and just type the name of the EMAN2 program
directly at the system command line. This interface is for people who know some
Python programming.

Warning: Failed to initialize Qt mode. Running in fallback mode with non-interactive graphics.

In [1]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-pawel'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

Steve Ludtke

unread,
Mar 9, 2019, 11:40:07 AM3/9/19
to eman2-de...@googlegroups.com
Just tested from current 'master' on both mac and linux and it worked fine.  This looks like you are trying to do remote display on a machine not set up for remote X/OpenGL
--------------------------------------------------------------------------------------
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine 
Charles C. Bell Jr., Professor of Structural Biology
Dept. of Biochemistry and Molecular Biology                      (www.bcm.edu/biochem)
Academic Director, CryoEM Core                                        (cryoem.bcm.edu)
Co-Director CIBR Center                                    (www.bcm.edu/research/cibr)



--
You received this message because you are subscribed to the Google Groups "EMAN2 and SPARX Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2-develope...@googlegroups.com.
To post to this group, send email to eman2-de...@googlegroups.com.
Visit this group at https://groups.google.com/group/eman2-developers.
For more options, visit https://groups.google.com/d/optout.

Paul Penczek

unread,
Mar 9, 2019, 11:58:01 AM3/9/19
to eman2-de...@googlegroups.com
Hi,

the point is that we established it about a decade ago and now, with transition to Qt5, I assume, it stopped working.
Th point is that quite often remote clusters (such as TACC) may not have graphics installed but one would still
want to be able to run simple programs interactively. After some trial and error I believe you introduced
try/except mechanism into e2_real.py and it worked well for years.

What changed now?

Thanks,
____________________
Pawel A. Penczek, Ph.D.
Professor
Structural Biology Imaging Center, co-Director
The University of Texas
phone: 713-500-5416
fax: 713-500-0652
https://med.uth.edu/bmb/faculty/pawel-a-penczek/

Paul Penczek

unread,
Mar 9, 2019, 12:05:55 PM3/9/19
to eman2-de...@googlegroups.com
Please look at that:

"""""""
[pawel@bmbpccl1 ~]$ e2.py
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19)
Type "copyright", "credits" or "license" for more information.

IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Welcome to the interactive EMAN2 Python interface, provided by ipython

NOTE: that you should NOT be running this program if your intent is to run other
EMAN2 programs. To do that, quit e2.py and just type the name of the EMAN2 program
directly at the system command line. This interface is for people who know some
Python programming.

Warning: Failed to initialize Qt mode. Running in fallback mode with non-interactive graphics.
"""""""

The last sentence means it knows there is no Qt and that it should work without it,
but then the printout is:

""""
In [1]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-pawel'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
"""""

meaning it still tries to use Qt. It means that either imports are in wrong order or something is imported
later on which should not be.



____________________
Pawel A. Penczek, Ph.D.
Professor
Structural Biology Imaging Center, co-Director
The University of Texas
phone: 713-500-5416
fax: 713-500-0652
https://med.uth.edu/bmb/faculty/pawel-a-penczek/

> On Mar 9, 2019, at 10:40 AM, Steve Ludtke <slud...@gmail.com> wrote:
>

Paul Penczek

unread,
Mar 9, 2019, 12:16:55 PM3/9/19
to eman2-de...@googlegroups.com
Hi,


I figured the problem is in e2.py:


e2real = os.path.join(os.path.abspath(os.path.dirname(__file__)), "e2_real.py")
os.execlp("ipython","ipython","-i","--gui=qt",e2real)


If I remove "--gui=qt", everything works fine. It means this line should be modified in a similar manner as e2_real.py is,
that is gui flag should be used only if Qt is present.

While I could fix it, I do not want to mess with somebody's code as I may break something.
So, please modify e2.py such that it works properly without qt installed.


Thanks,
____________________
Pawel A. Penczek, Ph.D.
Professor
Structural Biology Imaging Center, co-Director
The University of Texas
phone: 713-500-5416
fax: 713-500-0652
https://med.uth.edu/bmb/faculty/pawel-a-penczek/

> On Mar 9, 2019, at 10:40 AM, Steve Ludtke <slud...@gmail.com> wrote:
>

Steve Ludtke

unread,
Mar 9, 2019, 12:44:10 PM3/9/19
to eman2-de...@googlegroups.com
Hi Pawel,
there were no recent changes to the code. The only change that happened over the last ~2 years is importing Qt5 instead of Qt4 which doesn't impact any of the logic of this program. Since the switch to Anaconda, we have distributed Qt4/5 with the Anaconda packages, so there is no useful test of "does Qt exist". The test for a "DISPLAY" shell variable would detect sessions not even capable of X-windows, but in that situtation, e2.py does absolutely nothing, and just 
ipython
from EMAN2 import *

does exactly the same thing.

While I don't mind modifying e2.py to make it more broadly usable, exactly which situation are you trying to deal with? 
- DISPLAY not set, no X at all
- DISPLAY set, but nothing configured to make remote OpenGL work
- something else?

--------------------------------------------------------------------------------------
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine 
Charles C. Bell Jr., Professor of Structural Biology
Dept. of Biochemistry and Molecular Biology                      (www.bcm.edu/biochem)
Academic Director, CryoEM Core                                        (cryoem.bcm.edu)
Co-Director CIBR Center                                    (www.bcm.edu/research/cibr)


Paul Penczek

unread,
Mar 9, 2019, 12:55:41 PM3/9/19
to eman2-de...@googlegroups.com
Hi

In the past the problem was that some clusters did not have Qt installed. I do not know how it is now with Conda installer for source. I imagine for binary Qt is always there. 

So I think the problem is only with no X-windows. 

As I was saying, it worked for a decade so I am surprised it stopped now. 

While I agree one can simply import relevant stuff to ipythom, it would be nicer to have old functionality restored, meaning both e2 and sx should always work, even if they do not do much. 

Regards,
Pawel

Steve Ludtke

unread,
Mar 9, 2019, 9:45:15 PM3/9/19
to eman2-de...@googlegroups.com
Ok, you can see if the patched version meets your needs :^)

--------------------------------------------------------------------------------------
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine 
Charles C. Bell Jr., Professor of Structural Biology
Dept. of Biochemistry and Molecular Biology                      (www.bcm.edu/biochem)
Academic Director, CryoEM Core                                        (cryoem.bcm.edu)
Co-Director CIBR Center                                    (www.bcm.edu/research/cibr)


Paul Penczek

unread,
Mar 10, 2019, 12:36:18 PM3/10/19
to eman2-de...@googlegroups.com
Yes, now it works fine. Thank you.

____________________
Pawel A. Penczek, Ph.D.
Professor
Structural Biology Imaging Center, co-Director
The University of Texas
phone: 713-500-5416
fax: 713-500-0652
https://med.uth.edu/bmb/faculty/pawel-a-penczek/

Reply all
Reply to author
Forward
0 new messages