I'm having trouble with porting my scripts. I think the issue is with the 
installation of the Traits components but can't get any further: 

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/home/fs0/flitney/cv/cv.py in <module>()
     15 #cons = 
read_connections('/vols/Scratch/saad/simu_matrix3/res_new_surf/fdt_matrix3.dot')

     16 
---> 17 figure = mlab.gcf()
     18 figure.scene.disable_render = True
     19 print "rendering"

/usr/lib/python2.6/site-packages/Mayavi-3.4.1-py2.6-linux-x86_64.egg/enthought/mayavi/tools/figure.pyc
 in gcf(engine)
    112     """
    113     if engine is None:
--> 114         engine = get_engine()
    115     scene = engine.current_scene
    116     if scene is None:

/usr/lib/python2.6/site-packages/Mayavi-3.4.1-py2.6-linux-x86_64.egg/enthought/mayavi/tools/engine_manager.pyc
 in get_engine(self)
     94                                 if e.__class__.__name__ == 'Engine']
     95         if len(suitable) == 0:
---> 96             return self.new_engine()
     97         else:
     98             # Return the most engine add to the list most recently.


/usr/lib/python2.6/site-packages/Mayavi-3.4.1-py2.6-linux-x86_64.egg/enthought/mayavi/tools/engine_manager.pyc
 in new_engine(self)
    140             options.
    141         """
--> 142         check_backend()
    143         if options.backend == 'envisage':
    144             from enthought.mayavi.plugins.app import Mayavi

/usr/lib/python2.6/site-packages/Mayavi-3.4.1-py2.6-linux-x86_64.egg/enthought/mayavi/tools/engine_manager.pyc
 in check_backend()
     46 wxPython: http://www.wxpython.org/
     47 PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
---> 48 '''
     49 
     50 

ImportError: Could not import backend for traits
________________________________________________________________________________
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt
projects installed. If you installed Mayavi with easy_install, try easy_install 
<pkg_name>. easy_install Mayavi[app] will also work.

If you performed a source checkout, be sure to run 'python setup.py install'
in Traits, TraitsGUI, and the Traits backend of your choice.

Also make sure that either wxPython or PyQT is installed.
wxPython: http://www.wxpython.org/
PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro

WARNING: Failure executing file: <cv.py>

Also, when I try a very basic Traits based UI I get:

# configure_traits.py -- Sample code to demonstrate
#                        configure_traits()
from enthought.traits.api import HasTraits, Str, Int
import enthought.traits.ui

class SimpleEmployee(HasTraits):
    first_name = Str
    last_name = Str
    department = Str

    employee_number = Str
    salary = Int

sam = SimpleEmployee()
sam.configure_traits()

In [11]: run traits_test.py
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

/home/fs0/flitney/traits_test.py in <module>()
     13 
     14 sam = SimpleEmployee()
---> 15 sam.configure_traits()
     16 
     17 

/usr/lib/python2.6/site-packages/Traits-3.6.0-py2.6-linux-x86_64.egg/enthought/traits/has_traits.pyc
 in configure_traits(self, filename, view, kind, edit, context, handler, id, 
scrollable, **args)
   2536                 context = self
   2537             rc = toolkit().view_application( context, self.trait_view( 
view ),
-> 2538                                            kind, handler, id, 
scrollable, args )
   2539             if rc and (filename is not None):
   2540                 fd = None

/usr/lib/python2.6/site-packages/Traits-3.6.0-py2.6-linux-x86_64.egg/enthought/traits/ui/toolkit.pyc
 in view_application(self, context, view, kind, handler, id, scrollable, args)
    243 
    244         """
--> 245         raise NotImplementedError
    246 
    247     
#---------------------------------------------------------------------------


NotImplementedError: 
WARNING: Failure executing file: <traits_test.py>

In [12]: 

I've been using easy_install to install the components.

-- 
Dave Flitney, IT Manager
Oxford Centre for Functional MRI of the Brain
E:[email protected] W:+44-1865-222713 F:+44-1865-222717
URL: http://www.fmrib.ox.ac.uk/~flitney



------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to