clonly / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

Problem with mayavi #652

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I installed in my notebook the pythonxy and I´ve tried using mayavi. 
I'm not having success because any example I run, python gives the following 
error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 487, in runfile
    execfile(filename, namespace)
  File "C:\Python27\Lib\site-packages\xy\temp.py", line 9, in <module>
    from mayavi import mlab
  File "C:\Python27\lib\site-packages\mayavi\mlab.py", line 27, in <module>
    from mayavi.tools.camera import view, roll, yaw, pitch, move
  File "C:\Python27\lib\site-packages\mayavi\tools\camera.py", line 25, in <module>
    from engine_manager import get_engine
  File "C:\Python27\lib\site-packages\mayavi\tools\engine_manager.py", line 12, in <module>
    from mayavi.preferences.api import preference_manager
  File "C:\Python27\lib\site-packages\mayavi\preferences\api.py", line 4, in <module>
    from preference_manager import preference_manager
  File "C:\Python27\lib\site-packages\mayavi\preferences\preference_manager.py", line 29, in <module>
    from traitsui.api import View, Group, Item
  File "C:\Python27\lib\site-packages\traitsui\api.py", line 35, in <module>
    from .editors.api import (ArrayEditor, BooleanEditor, ButtonEditor,
  File "C:\Python27\lib\site-packages\traitsui\editors\__init__.py", line 22, in <module>
    from .api import (toolkit, ArrayEditor, BooleanEditor, ButtonEditor,
  File "C:\Python27\lib\site-packages\traitsui\editors\api.py", line 10, in <module>
    from .code_editor import CodeEditor
  File "C:\Python27\lib\site-packages\traitsui\editors\code_editor.py", line 36, in <module>
    class ToolkitEditorFactory ( EditorFactory ):
  File "C:\Python27\lib\site-packages\traitsui\editors\code_editor.py", line 48, in ToolkitEditorFactory
    mark_color = Color( 0xECE9D8 )
  File "C:\Python27\lib\site-packages\traits\traits.py", line 487, in __call__
    return self.maker_function( *args, **metadata )
  File "C:\Python27\lib\site-packages\traits\traits.py", line 1183, in Color
    return ColorTrait( *args, **metadata )
  File "C:\Python27\lib\site-packages\traitsui\toolkit_traits.py", line 7, in ColorTrait
    return toolkit().color_trait( *args, **traits )
  File "C:\Python27\lib\site-packages\traitsui\toolkit.py", line 109, in toolkit
    _toolkit = _import_toolkit(ETSConfig.toolkit)
  File "C:\Python27\lib\site-packages\traitsui\toolkit.py", line 51, in _import_toolkit
    return __import__( name, globals=globals(), level=1 ).toolkit
  File "C:\Python27\lib\site-packages\traitsui\qt4\__init__.py", line 18, in <module>
    import pyface.qt
  File "C:\Python27\lib\site-packages\pyface\qt\__init__.py", line 35, in <module>
    prepare_pyqt4()
  File "C:\Python27\lib\site-packages\pyface\qt\__init__.py", line 17, in prepare_pyqt4
    sip.setapi('QString', 2)
ValueError: API 'QString' has already been set to version 1

What should I do? 
I'm using windows 7 32-bit spyder2.
Thanks,
Fabiano

Original issue reported on code.google.com by fpauli...@gmail.com on 1 May 2013 at 2:21

GoogleCodeExporter commented 9 years ago
Please make sure you have wx installed. That is the most stable and best 
supported backend for it.

Original comment by grizzly.nyo on 2 May 2013 at 7:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
How can i verify if wx was installed?
There is a folder, isn't?

Original comment by fpauli...@gmail.com on 3 May 2013 at 1:43

GoogleCodeExporter commented 9 years ago
Open the XY launcher and see if wxPython is installed.
[image: Inline image 1]

-gabi

Original comment by grizzly.nyo on 3 May 2013 at 1:46

GoogleCodeExporter commented 9 years ago
I have the wxPython-version 2.8.12.
When I've used spyder IDE an error appears like that i posted.
But if I've used mayavi as applications in XY launcher that's OK!
I don't understand what is happening.

Original comment by fpauli...@gmail.com on 4 May 2013 at 11:57

GoogleCodeExporter commented 9 years ago
I cannot start using mayavi2 using spyder IDE from pythonxy.
What should i do?
The mayavi2 is working well, but i really want to use mayavi in spyder?
Suggestions?
Thanks.

Original comment by fpauli...@gmail.com on 25 May 2013 at 7:57

GoogleCodeExporter commented 9 years ago
Use Spyder preferences to set QString API to 2 - 
Tools -> Preferences -> Console -> External Modules Tab -> Default API -> API #2

Original comment by grizzly.nyo on 3 Jun 2013 at 8:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for help!
It's working!
Just remembering: Spyder must be restarted after changed Preferences.

Original comment by fpauli...@gmail.com on 10 Jun 2013 at 5:01

GoogleCodeExporter commented 9 years ago

Original comment by grizzly.nyo on 10 Jun 2013 at 6:09