Problem importing mlab in ipython: "QWidget: Must construct a QApplication before a QPaintDevice"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem importing mlab in ipython: "QWidget: Must construct a QApplication before a QPaintDevice"

Caleb Rottman
Hi

I've installed mayavi from my package manager (on OpenSUSE 12.3), and it installed successfully.  However, when I run ipython and try to import I get an error.  My commands/output are:


ipython --gui=wx                                                                                         
In [1]: from mayavi import mlab                                                                                  
QWidget: Must construct a QApplication before a QPaintDevice                                             
[1]    19690 abort      ipython --gui=wx                                                                 
                                                                                                         
ipython --gui=wx --pylab=wx                                                                              
In [1]: from mayavi import mlab                                                                          
QWidget: Must construct a QApplication before a QPaintDevice                                             
[1]    19887 abort      ipython --gui=wx --pylab=wx                                                      
                                                                                                         
ipython                                                                                                  
In [1]: from mayavi import mlab                                                                          
QWidget: Must construct a QApplication before a QPaintDevice                                             
[1]    20582 abort      ipython                                                                          


If it helps, these are the versions of the required software that I currently have installed on my machine

i | python-vtk               | package    | 5.10.1-2.1.1                                                 
i | vtk                      | package    | 5.10.1-2.1.1                                                 
i | python-wxWidgets         | package    | 2.8.12.1-5.1.1                                               
i | IPython                  | package    | 1.1.0-56.2                                                   
i | python-mayavi            | package    | 4.3.0-3.21                                                   
i | python-envisage          | package    | 4.3.0-4.6                                                    
i | python-numpy             | package    | 1.7.1-71.2                                                   
i | python-numpy-devel       | package    | 1.7.1-71.2                                                   



Any thoughts?

Caleb

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem importing mlab in ipython: "QWidget: Must construct a QApplication before a QPaintDevice"

Robert Kern
On Tue, Nov 12, 2013 at 10:47 PM, Caleb Rottman <[hidden email]> wrote:

> Hi
>
> I've installed mayavi from my package manager (on OpenSUSE 12.3), and it
> installed successfully.  However, when I run ipython and try to import I get
> an error.  My commands/output are:
>
>
> ipython --gui=wx
> In [1]: from mayavi import mlab
> QWidget: Must construct a QApplication before a QPaintDevice
> [1]    19690 abort      ipython --gui=wx

If you want Mayavi to use wx, you must also set the environment
variable `ETS_TOOLKIT=wx` as well.

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem importing mlab in ipython: "QWidget: Must construct a QApplication before a QPaintDevice"

Caleb Rottman
I set my environment variable, but that doesn't fix the problem.

% echo $ETS_TOOLKIT
wx
% ipython --gui=wx
In [1]: from mayavi import mlab
QWidget: Must construct a QApplication before a QPaintDevice
[1]    23011 abort      ipython --gui=wx




On Tue, Nov 12, 2013 at 3:52 PM, Robert Kern <[hidden email]> wrote:
On Tue, Nov 12, 2013 at 10:47 PM, Caleb Rottman <[hidden email]> wrote:
> Hi
>
> I've installed mayavi from my package manager (on OpenSUSE 12.3), and it
> installed successfully.  However, when I run ipython and try to import I get
> an error.  My commands/output are:
>
>
> ipython --gui=wx
> In [1]: from mayavi import mlab
> QWidget: Must construct a QApplication before a QPaintDevice
> [1]    19690 abort      ipython --gui=wx

If you want Mayavi to use wx, you must also set the environment
variable `ETS_TOOLKIT=wx` as well.

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev