VTK problems in Ubuntu install ???

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

VTK problems in Ubuntu install ???

robert somerville
Hi; I am trying to run the Mayavi demo on the enthought webpages , but i seem to be having a problem finding (or am i missing something ?)
on Ubuntu 9.10, with python2.5 and the standard Ubuntu packages ...

in ipython2.5 and in the python console i take import errors on the following line ...
( i have installed everthing that looks remotely like VTK, Mayavi,etc that i can find on the package manager synaptic ...), any ideas anybody ???

>>> from enthought.mayavi import mlab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/mlab.py", line 13, in <module>
    from enthought.mayavi.tools.camera import view, roll
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/camera.py", line 23, in <module>
    from engine_manager import get_engine
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/engine_manager.py", line 14, in <module>
    from enthought.mayavi.core.engine import Engine
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/core/engine.py", line 15, in <module>
    raise ImportError(msg)
ImportError: No module named vtk
________________________________________________________________________________
Do you have vtk installed properly?


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

Re: VTK problems in Ubuntu install ???

Ilan Schnell
You need to have Python VTK bindings installed.  When
you open a Python prompt and type:
 >>> import vtk
You should not see any errors or warnings.

- Ilan


On Feb 3, 2010, at 12:08 PM, robert somerville wrote:

> Hi; I am trying to run the Mayavi demo on the enthought webpages ,  
> but i seem to be having a problem finding (or am i missing  
> something ?)
> on Ubuntu 9.10, with python2.5 and the standard Ubuntu packages ...
>
> in ipython2.5 and in the python console i take import errors on the  
> following line ...
> ( i have installed everthing that looks remotely like VTK,  
> Mayavi,etc that i can find on the package manager synaptic ...), any  
> ideas anybody ???
>
> >>> from enthought.mayavi import mlab
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/mlab.py",  
> line 13, in <module>
>     from enthought.mayavi.tools.camera import view, roll
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/
> camera.py", line 23, in <module>
>     from engine_manager import get_engine
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/
> engine_manager.py", line 14, in <module>
>     from enthought.mayavi.core.engine import Engine
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/core/
> engine.py", line 15, in <module>
>     raise ImportError(msg)
> ImportError: No module named vtk
> ________________________________________________________________________________
> Do you have vtk installed properly?
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

robert somerville
hi ;
i have reinstalled python-vtk, which synaptic claims is the python vtk bindings, but no happyess:
>>> i>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named vtk

it works gor pyhon 2.6, but lots on other enthought doesn't work with 2.6

synaptic claims that these files were installed:
I NOTICE nothing installed in a python2.5 directory .. is there a problem with this Ubuntu Package ??? if so what to do about it ...

/.
/usr
/usr/bin
/usr/bin/vtkWrapPython
/usr/bin/vtkWrapPythonInit
/usr/bin/vtkpython
/usr/share
/usr/share/doc
/usr/share/doc/python-vtk
/usr/share/doc/python-vtk/copyright
/usr/share/doc/python-vtk/README_WRAP.txt.gz
/usr/share/doc/python-vtk/changelog.Debian.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/python-vtk
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/vtkpython.1.gz
/usr/share/pyshared
/usr/share/pyshared/vtk
/usr/share/pyshared/vtk/gtk
/usr/share/pyshared/vtk/gtk/GtkVTKRenderWindow.py
/usr/share/pyshared/vtk/gtk/__init__.py
/usr/share/pyshared/vtk/gtk/GtkVTKRenderWindowInteractor.py
/usr/share/pyshared/vtk/util
/usr/share/pyshared/vtk/util/misc.py
/usr/share/pyshared/vtk/util/vtkImageExportToArray.py
/usr/share/pyshared/vtk/util/vtkConstants.py
/usr/share/pyshared/vtk/util/vtkImageImportFromArray.py
/usr/share/pyshared/vtk/util/vtkMethodParser.py
/usr/share/pyshared/vtk/util/numpy_support.py
/usr/share/pyshared/vtk/util/__init__.py
/usr/share/pyshared/vtk/util/colors.py
/usr/share/pyshared/vtk/common.py
/usr/share/pyshared/vtk/test
/usr/share/pyshared/vtk/test/Testing.py
/usr/share/pyshared/vtk/test/BlackBox.py
/usr/share/pyshared/vtk/test/__init__.py
/usr/share/pyshared/vtk/parallel.py
/usr/share/pyshared/vtk/tk
/usr/share/pyshared/vtk/tk/__init__.py
/usr/share/pyshared/vtk/tk/vtkLoadPythonTkWidgets.py
/usr/share/pyshared/vtk/tk/vtkTkRenderWidget.py
/usr/share/pyshared/vtk/tk/vtkTkPhotoImage.py
/usr/share/pyshared/vtk/tk/vtkTkImageViewerWidget.py
/usr/share/pyshared/vtk/tk/vtkTkRenderWindowInteractor.py
/usr/share/pyshared/vtk/graphics.py
/usr/share/pyshared/vtk/views.py
/usr/share/pyshared/vtk/wx
/usr/share/pyshared/vtk/wx/__init__.py
/usr/share/pyshared/vtk/wx/wxVTKRenderWindow.py
/usr/share/pyshared/vtk/wx/wxVTKRenderWindowInteractor.py
/usr/share/pyshared/vtk/genericfiltering.py
/usr/share/pyshared/vtk/__helper.py
/usr/share/pyshared/vtk/infovis.py
/usr/share/pyshared/vtk/VTK-5.2.1.egg-info
/usr/share/pyshared/vtk/qt
/usr/share/pyshared/vtk/qt/QVTKRenderWindowInteractor.py
/usr/share/pyshared/vtk/qt/QVTKRenderWidget.py
/usr/share/pyshared/vtk/qt/__init__.py
/usr/share/pyshared/vtk/qt4
/usr/share/pyshared/vtk/qt4/__init__.py
/usr/share/pyshared/vtk/qt4/QVTKRenderWindowInteractor.py
/usr/share/pyshared/vtk/required.py
/usr/share/pyshared/vtk/io.py
/usr/share/pyshared/vtk/volumerendering.py
/usr/share/pyshared/vtk/imaging.py
/usr/share/pyshared/vtk/__init__.py
/usr/share/pyshared/vtk/widgets.py
/usr/share/pyshared/vtk/filtering.py
/usr/share/pyshared/vtk/hybrid.py
/usr/share/pyshared/vtk/rendering.py
/usr/share/python-support
/usr/share/python-support/python-vtk.public
/usr/lib
/usr/lib/vtk-5.2
/usr/lib/vtk-5.2/testing
/usr/lib/vtk-5.2/testing/HeaderTesting.py
/usr/lib/vtk-5.2/testing/WindowsMangleList.py
/usr/lib/libvtkCommonPythonD.so.5.2.1
/usr/lib/libvtkFilteringPythonD.so.5.2.1
/usr/lib/libvtkGenericFilteringPythonD.so.5.2.1
/usr/lib/libvtkGraphicsPythonD.so.5.2.1
/usr/lib/libvtkHybridPythonD.so.5.2.1
/usr/lib/libvtkImagingPythonD.so.5.2.1
/usr/lib/libvtkInfovisPythonD.so.5.2.1
/usr/lib/libvtkIOPythonD.so.5.2.1
/usr/lib/libvtkParallelPythonD.so.5.2.1
/usr/lib/libvtkRenderingPythonD.so.5.2.1
/usr/lib/libvtkRenderingPythonTkWidgets.so.5.2.1
/usr/lib/libvtkViewsPythonD.so.5.2.1
/usr/lib/libvtkVolumeRenderingPythonD.so.5.2.1
/usr/lib/libvtkWidgetsPythonD.so.5.2.1
/usr/lib/pyshared
/usr/lib/pyshared/python2.6
/usr/lib/pyshared/python2.6/vtk
/usr/lib/pyshared/python2.6/vtk/libvtkFilteringPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkVolumeRenderingPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkViewsPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkParallelPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkGraphicsPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkWidgetsPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkInfovisPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkRenderingPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkGenericFilteringPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkImagingPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkHybridPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkIOPython.so
/usr/lib/pyshared/python2.6/vtk/libvtkCommonPython.so
/usr/lib/libvtkCommonPythonD.so
/usr/lib/libvtkCommonPythonD.so.5.2
/usr/lib/libvtkFilteringPythonD.so
/usr/lib/libvtkFilteringPythonD.so.5.2
/usr/lib/libvtkGenericFilteringPythonD.so
/usr/lib/libvtkGenericFilteringPythonD.so.5.2
/usr/lib/libvtkGraphicsPythonD.so
/usr/lib/libvtkGraphicsPythonD.so.5.2
/usr/lib/libvtkHybridPythonD.so
/usr/lib/libvtkHybridPythonD.so.5.2
/usr/lib/libvtkImagingPythonD.so
/usr/lib/libvtkImagingPythonD.so.5.2
/usr/lib/libvtkInfovisPythonD.so
/usr/lib/libvtkInfovisPythonD.so.5.2
/usr/lib/libvtkIOPythonD.so
/usr/lib/libvtkIOPythonD.so.5.2
/usr/lib/libvtkParallelPythonD.so
/usr/lib/libvtkParallelPythonD.so.5.2
/usr/lib/libvtkRenderingPythonD.so
/usr/lib/libvtkRenderingPythonD.so.5.2
/usr/lib/libvtkRenderingPythonTkWidgets.so
/usr/lib/libvtkRenderingPythonTkWidgets.so.5.2
/usr/lib/libvtkViewsPythonD.so
/usr/lib/libvtkViewsPythonD.so.5.2
/usr/lib/libvtkVolumeRenderingPythonD.so
/usr/lib/libvtkVolumeRenderingPythonD.so.5.2
/usr/lib/libvtkWidgetsPythonD.so
/usr/lib/libvtkWidgetsPythonD.so.5.2





On Wed, Feb 3, 2010 at 10:25 AM, Ilan Schnell <[hidden email]> wrote:
You need to have Python VTK bindings installed.  When
you open a Python prompt and type:
 >>> import vtk
You should not see any errors or warnings.

- Ilan


On Feb 3, 2010, at 12:08 PM, robert somerville wrote:

> Hi; I am trying to run the Mayavi demo on the enthought webpages ,
> but i seem to be having a problem finding (or am i missing
> something ?)
> on Ubuntu 9.10, with python2.5 and the standard Ubuntu packages ...
>
> in ipython2.5 and in the python console i take import errors on the
> following line ...
> ( i have installed everthing that looks remotely like VTK,
> Mayavi,etc that i can find on the package manager synaptic ...), any
> ideas anybody ???
>
> >>> from enthought.mayavi import mlab
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/mlab.py",
> line 13, in <module>
>     from enthought.mayavi.tools.camera import view, roll
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/
> camera.py", line 23, in <module>
>     from engine_manager import get_engine
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/
> engine_manager.py", line 14, in <module>
>     from enthought.mayavi.core.engine import Engine
>   File "/usr/lib/python2.5/site-packages/enthought/mayavi/core/
> engine.py", line 15, in <module>
>     raise ImportError(msg)
> ImportError: No module named vtk
> ________________________________________________________________________________
> Do you have vtk installed properly?
>
> _______________________________________________
> 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


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

Re: VTK problems in Ubuntu install ???

Gael Varoquaux
On Wed, Feb 03, 2010 at 10:39:31AM -0800, robert somerville wrote:
>    hi ;
>    i have reinstalled python-vtk, which synaptic claims is the python vtk
>    bindings, but no happyess:
>    >>> i>>> import vtk
>    Traceback (most recent call last):
>    � File "<stdin>", line 1, in <module>
>    ImportError: No module named vtk

It seems that ubuntu did not package vtk for python2.5. It would be
easier for you if you used python2.6.

It is true that the packages are borked under Ubuntu, and it seems that
they are not doing much about it, eventhough we have signaled it, and
pointed out the fix.

However, if you follow the thread in the bug report, you can find a
proposed workaround: download the deb for enable under lucid, and install
it locally: http://packages.ubuntu.com/lucid/python-enable in the bottom
left of the page, you choose the architecture and install locally using
'dpkg -i ....deb'

HTH,

Ga�l

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

Re: VTK problems in Ubuntu install ???

robert somerville
Yes that works   ;-)
Thanks very much Gael

On Wed, Feb 3, 2010 at 12:53 PM, Gael Varoquaux <[hidden email]> wrote:
On Wed, Feb 03, 2010 at 10:39:31AM -0800, robert somerville wrote:
>    hi ;
>    i have reinstalled python-vtk, which synaptic claims is the python vtk
>    bindings, but no happyess:
>    >>> i>>> import vtk
>    Traceback (most recent call last):
>      File "<stdin>", line 1, in <module>
>    ImportError: No module named vtk

It seems that ubuntu did not package vtk for python2.5. It would be
easier for you if you used python2.6.

It is true that the packages are borked under Ubuntu, and it seems that
they are not doing much about it, eventhough we have signaled it, and
pointed out the fix.

However, if you follow the thread in the bug report, you can find a
proposed workaround: download the deb for enable under lucid, and install
it locally: http://packages.ubuntu.com/lucid/python-enable in the bottom
left of the page, you choose the architecture and install locally using
'dpkg -i ....deb'

HTH,

Gaël

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

robert somerville
i was trying some of Gael's mayavi code; ( i have installed the Ubuntu 10.4 enthought enable DPKG as suggested ...)

i am taking an error in the vtk-mayavi code at this point , what is going on ??? is there a fix ???
(python2.6, ubuntu9.10, enthought-enable 3.2 ...)

>>> import enthought.mayavi.scripts.mayavi2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/enthought/mayavi/scripts/mayavi2.py", line 26, in <module>
    wxversion.select('2.8')
  File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wxversion.py", line 141, in select
    raise VersionError("wxversion.select() must be called before wxPython is imported")
wxversion.VersionError: wxversion.select() must be called before wxPython is imported


On Wed, Feb 3, 2010 at 4:04 PM, robert somerville <[hidden email]> wrote:
Yes that works   ;-)
Thanks very much Gael

On Wed, Feb 3, 2010 at 12:53 PM, Gael Varoquaux <[hidden email]> wrote:
On Wed, Feb 03, 2010 at 10:39:31AM -0800, robert somerville wrote:
>    hi ;
>    i have reinstalled python-vtk, which synaptic claims is the python vtk
>    bindings, but no happyess:
>    >>> i>>> import vtk
>    Traceback (most recent call last):
>      File "<stdin>", line 1, in <module>
>    ImportError: No module named vtk

It seems that ubuntu did not package vtk for python2.5. It would be
easier for you if you used python2.6.

It is true that the packages are borked under Ubuntu, and it seems that
they are not doing much about it, eventhough we have signaled it, and
pointed out the fix.

However, if you follow the thread in the bug report, you can find a
proposed workaround: download the deb for enable under lucid, and install
it locally: http://packages.ubuntu.com/lucid/python-enable in the bottom
left of the page, you choose the architecture and install locally using
'dpkg -i ....deb'

HTH,

Gaël

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

robert somerville
In reply to this post by robert somerville
i should have added the example is attached  here:

On Wed, Feb 3, 2010 at 10:08 AM, robert somerville <[hidden email]> wrote:
Hi; I am trying to run the Mayavi demo on the enthought webpages , but i seem to be having a problem finding (or am i missing something ?)
on Ubuntu 9.10, with python2.5 and the standard Ubuntu packages ...

in ipython2.5 and in the python console i take import errors on the following line ...
( i have installed everthing that looks remotely like VTK, Mayavi,etc that i can find on the package manager synaptic ...), any ideas anybody ???

>>> from enthought.mayavi import mlab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/mlab.py", line 13, in <module>
    from enthought.mayavi.tools.camera import view, roll
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/camera.py", line 23, in <module>
    from engine_manager import get_engine
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/tools/engine_manager.py", line 14, in <module>
    from enthought.mayavi.core.engine import Engine
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/core/engine.py", line 15, in <module>
    raise ImportError(msg)
ImportError: No module named vtk
________________________________________________________________________________
Do you have vtk installed properly?



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

ttt.py (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

robert somerville
In reply to this post by robert somerville
I apologize for the last messed up post, the code i am trying to run
is found here at this web address: an example of how to create VTK
datasets ....

http://tinyurl.com/yh29c4s

On Thu, Feb 4, 2010 at 4:18 PM, robert somerville
<[hidden email]> wrote:

>
> i was trying some of Gael's mayavi code; ( i have installed the Ubuntu 10.4 enthought enable DPKG as suggested ...)
>
> i am taking an error in the vtk-mayavi code at this point , what is going on ??? is there a fix ???
> (python2.6, ubuntu9.10, enthought-enable 3.2 ...)
>
> >>> import enthought.mayavi.scripts.mayavi2
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.6/dist-packages/enthought/mayavi/scripts/mayavi2.py", line 26, in <module>
>     wxversion.select('2.8')
>   File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wxversion.py", line 141, in select
>     raise VersionError("wxversion.select() must be called before wxPython is imported")
> wxversion.VersionError: wxversion.select() must be called before wxPython is imported
>
>
> On Wed, Feb 3, 2010 at 4:04 PM, robert somerville <[hidden email]> wrote:
>>
>> Yes that works   ;-)
>> Thanks very much Gael
>>
>> On Wed, Feb 3, 2010 at 12:53 PM, Gael Varoquaux <[hidden email]> wrote:
>>>
>>> On Wed, Feb 03, 2010 at 10:39:31AM -0800, robert somerville wrote:
>>> >    hi ;
>>> >    i have reinstalled python-vtk, which synaptic claims is the python vtk
>>> >    bindings, but no happyess:
>>> >    >>> i>>> import vtk
>>> >    Traceback (most recent call last):
>>> >      File "<stdin>", line 1, in <module>
>>> >    ImportError: No module named vtk
>>>
>>> It seems that ubuntu did not package vtk for python2.5. It would be
>>> easier for you if you used python2.6.
>>>
>>> It is true that the packages are borked under Ubuntu, and it seems that
>>> they are not doing much about it, eventhough we have signaled it, and
>>> pointed out the fix.
>>>
>>> However, if you follow the thread in the bug report, you can find a
>>> proposed workaround: download the deb for enable under lucid, and install
>>> it locally: http://packages.ubuntu.com/lucid/python-enable in the bottom
>>> left of the page, you choose the architecture and install locally using
>>> 'dpkg -i ....deb'
>>>
>>> HTH,
>>>
>>> Gaël
>>>
>>> _______________________________________________
>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

Gael Varoquaux
On Thu, Feb 04, 2010 at 05:00:39PM -0800, robert somerville wrote:
> I apologize for the last messed up post, the code i am trying to run
> is found here at this web address: an example of how to create VTK
> datasets ....

> http://tinyurl.com/yh29c4s

> On Thu, Feb 4, 2010 at 4:18 PM, robert somerville
> <[hidden email]> wrote:

> > i was trying some of Gael's mayavi code; ( i have installed the Ubuntu 10.4 enthought enable DPKG as suggested ...)

> > i am taking an error in the vtk-mayavi code at this point , what is going on ??? is there a fix ???
> > (python2.6, ubuntu9.10, enthought-enable 3.2 ...)

> > >>> import enthought.mayavi.scripts.mayavi2

Try removing that line. It is not useful in this example.

> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> >   File "/usr/lib/python2.6/dist-packages/enthought/mayavi/scripts/mayavi2.py", line 26, in <module>
> >     wxversion.select('2.8')
> >   File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wxversion.py", line 141, in select
> >     raise VersionError("wxversion.select() must be called before wxPython is imported")
> > wxversion.VersionError: wxversion.select() must be called before wxPython is imported

To tell you what's going on, mayavi is trying to switch to a more recent
version of wx, and it is failing. I am a bit surprised that the error is
raised. I thought that we were capturing it, and failing silently. Could
you send me the content of the mayavi2.py file, so that I can check how
its done in your version?

Also, I am a bit surprised at that failure: something is importing wx too
early. I just wonder what it is. It might simply be ETS. How exaclty are
you runing the file?

HTH,

Gaël

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

Re: VTK problems in Ubuntu install ???

robert somerville
hi; i am running it from the Bash command line;
python(2.6.4) demo.py

if I comment out that mayavi line,  get the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wx/_core.py",
line 13535, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "p4.py", line 138, in main
    view(image_data())
  File "p4.py", line 128, in view
    figure=dataset.class_name[3:])
TypeError: figure() got an unexpected keyword argument 'figure'
rsomerville@galena:~/temp_prog$

i am attaching the file mayavi2.py, which i found at : (all sym links
pointed at it ..., it has a time stamp of (see below)
/usr/share/pyshared/enthought/mayavi/scripts/mayavi2.py

rsomerville@galena:/usr$ find ./ -name "mayavi2*py" -ls
1450282   24 -rwxr-xr-x   1 root     root        21263 Jul  1  2009
./share/pyshared/enthought/mayavi/scripts/mayavi2.py
1714087    0 lrwxrwxrwx   1 root     root           55 Jan  4 11:59
./lib/python2.5/site-packages/enthought/mayavi/scripts/mayavi2.py ->
/usr/share/pyshared/enthought/mayavi/scripts/mayavi2.py
1712193    0 lrwxrwxrwx   1 root     root           55 Dec 11 09:16
./lib/python2.6/dist-packages/enthought/mayavi/scripts/mayavi2.py ->
/usr/share/pyshared/enthought/mayavi/scripts/mayavi2.py




On Thu, Feb 4, 2010 at 10:42 PM, Gael Varoquaux
<[hidden email]> wrote:

> On Thu, Feb 04, 2010 at 05:00:39PM -0800, robert somerville wrote:
>> I apologize for the last messed up post, the code i am trying to run
>> is found here at this web address: an example of how to create VTK
>> datasets ....
>
>> http://tinyurl.com/yh29c4s
>
>> On Thu, Feb 4, 2010 at 4:18 PM, robert somerville
>> <[hidden email]> wrote:
>
>> > i was trying some of Gael's mayavi code; ( i have installed the Ubuntu 10.4 enthought enable DPKG as suggested ...)
>
>> > i am taking an error in the vtk-mayavi code at this point , what is going on ??? is there a fix ???
>> > (python2.6, ubuntu9.10, enthought-enable 3.2 ...)
>
>> > >>> import enthought.mayavi.scripts.mayavi2
>
> Try removing that line. It is not useful in this example.
>
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> >   File "/usr/lib/python2.6/dist-packages/enthought/mayavi/scripts/mayavi2.py", line 26, in <module>
>> >     wxversion.select('2.8')
>> >   File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wxversion.py", line 141, in select
>> >     raise VersionError("wxversion.select() must be called before wxPython is imported")
>> > wxversion.VersionError: wxversion.select() must be called before wxPython is imported
>
> To tell you what's going on, mayavi is trying to switch to a more recent
> version of wx, and it is failing. I am a bit surprised that the error is
> raised. I thought that we were capturing it, and failing silently. Could
> you send me the content of the mayavi2.py file, so that I can check how
> its done in your version?
>
> Also, I am a bit surprised at that failure: something is importing wx too
> early. I just wonder what it is. It might simply be ETS. How exaclty are
> you runing the file?
>
> HTH,
>
> Gaël
>
> _______________________________________________
> 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

mayavi2.py (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

Gael Varoquaux
On Fri, Feb 05, 2010 at 08:31:32AM -0800, robert somerville wrote:
> hi; i am running it from the Bash command line;
> python(2.6.4) demo.py

> if I comment out that mayavi line,  get the following error:

OK, so could you try moving that import to be the first one.

> Traceback (most recent call last):
>   File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wx/_core.py",
> line 13535, in <lambda>
>     lambda event: event.callable(*event.args, **event.kw) )
>   File "p4.py", line 138, in main
>     view(image_data())
>   File "p4.py", line 128, in view
>     figure=dataset.class_name[3:])
> TypeError: figure() got an unexpected keyword argument 'figure'
> rsomerville@galena:~/temp_prog$

So, it seems that Traits no longer works well with wx 2.6. Its not the
end of the world.

> i am attaching the file mayavi2.py, which i found at : (all sym links
> pointed at it ..., it has a time stamp of (see below)
> /usr/share/pyshared/enthought/mayavi/scripts/mayavi2.py

Yes, it seems that we improved it since you checked this out. You would
be having different difficulties, because you'd find the wx2.6 problem,
but not this one.

HTH,

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

Re: VTK problems in Ubuntu install ???

Varun Hiremath
In reply to this post by Gael Varoquaux
Hi Gael,

On Fri, Feb 5, 2010 at 1:42 AM, Gael Varoquaux
<[hidden email]> wrote:

>> > i am taking an error in the vtk-mayavi code at this point , what is going on ??? is there a fix ???
>> > (python2.6, ubuntu9.10, enthought-enable 3.2 ...)
>
>> > >>> import enthought.mayavi.scripts.mayavi2
>
> Try removing that line. It is not useful in this example.
>
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> >   File "/usr/lib/python2.6/dist-packages/enthought/mayavi/scripts/mayavi2.py", line 26, in <module>
>> >     wxversion.select('2.8')
>> >   File "/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wxversion.py", line 141, in select
>> >     raise VersionError("wxversion.select() must be called before wxPython is imported")
>> > wxversion.VersionError: wxversion.select() must be called before wxPython is imported
>
> To tell you what's going on, mayavi is trying to switch to a more recent
> version of wx, and it is failing. I am a bit surprised that the error is
> raised. I thought that we were capturing it, and failing silently. Could
> you send me the content of the mayavi2.py file, so that I can check how
> its done in your version?

Sorry, I had added that wxversion.select('2.8') line in mayavi2.py in
Debian as a temporary fix for this bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478870
(see patches/wxversion.diff)

May be we can remove it now/ or catch the exception.

> Also, I am a bit surprised at that failure: something is importing wx too
> early. I just wonder what it is. It might simply be ETS. How exaclty are
> you runing the file?

Since, Robert tried importing mayavi2 from the python shell, my guess
is that he might have imported wx in the shell before that line, which
caused the error:

Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> import enthought.mayavi.scripts.mayavi2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/scripts/mayavi2.py",
line 26, in <module>
    wxversion.select('2.8')
  File "/usr/lib/python2.5/site-packages/wxversion.py", line 144, in select
    raise AlreadyImportedError("wxversion.select() must be called
before wxPython is imported")
wxversion.AlreadyImportedError: wxversion.select() must be called
before wxPython is imported

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

Re: VTK problems in Ubuntu install ???

Gael Varoquaux
On Fri, Feb 05, 2010 at 12:41:38PM -0500, Varun Hiremath wrote:
> Sorry, I had added that wxversion.select('2.8') line in mayavi2.py in
> Debian as a temporary fix for this bug:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478870
> (see patches/wxversion.diff)

No worries, Mayavi works better with 2.8

> May be we can remove it now/ or catch the exception.

The best thing would be to grab the corresponding file from trunk. I
simply applied your modifications but with error management.

> > Also, I am a bit surprised at that failure: something is importing wx too
> > early. I just wonder what it is. It might simply be ETS. How exaclty are
> > you runing the file?

> Since, Robert tried importing mayavi2 from the python shell, my guess
> is that he might have imported wx in the shell before that line, which
> caused the error:

Yes, that's what I suspected.

Cheers,

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

Re: VTK problems in Ubuntu install ???

robert somerville
should i be accessing (can i?, if so how) the debian FTP site fro the
latest Enthought packages and installing them on my Ubuntu 9.10 system
?? I have had little luck building the package from scratch (egg
files), and would love to find working packages somewhere  ...

Thanks for any help to this python/enthought newbie (the more verbose,
the better ....)
Robert Somerville

On Fri, Feb 5, 2010 at 9:48 AM, Gael Varoquaux
<[hidden email]> wrote:

> On Fri, Feb 05, 2010 at 12:41:38PM -0500, Varun Hiremath wrote:
>> Sorry, I had added that wxversion.select('2.8') line in mayavi2.py in
>> Debian as a temporary fix for this bug:
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478870
>> (see patches/wxversion.diff)
>
> No worries, Mayavi works better with 2.8
>
>> May be we can remove it now/ or catch the exception.
>
> The best thing would be to grab the corresponding file from trunk. I
> simply applied your modifications but with error management.
>
>> > Also, I am a bit surprised at that failure: something is importing wx too
>> > early. I just wonder what it is. It might simply be ETS. How exaclty are
>> > you runing the file?
>
>> Since, Robert tried importing mayavi2 from the python shell, my guess
>> is that he might have imported wx in the shell before that line, which
>> caused the error:
>
> Yes, that's what I suspected.
>
> Cheers,
>
> Gaël
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: VTK problems in Ubuntu install ???

Varun Hiremath
Hi Robert,

On Fri, Feb 5, 2010 at 1:45 PM, robert somerville
<[hidden email]> wrote:
> should i be accessing (can i?, if so how) the debian FTP site fro the
> latest Enthought packages and installing them on my Ubuntu 9.10 system
> ?? I have had little luck building the package from scratch (egg
> files), and would love to find working packages somewhere  ...

I don't think using Debian packages on Ubuntu would be a good idea.
Use Ubuntu packages, but stick to one python version -- 2.5 or 2.6 --
and then install all packages built for that version. Everything
should work fine then.

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