[Numpy-discussion] question about standalone small software and teaching

Robert Kern robert.kern@gmail....
Wed Apr 4 16:36:19 CDT 2007

vallis.35530053@bloglines.com wrote:
> Hello Gael (numpy friends),
> I'd love to use Traits and TraitsUI. It looks
> like a very promising approach. But why is it so difficult to install? If
> I download the source from http://code.enthought.com/traits/, and follow the
> instructions in enthought.traits-1.1.0/README, and then run the "code snippet
> #1" in your tutorial, I get

> BTW, I'm using Python 2.4.4 on Macintel, with wxPython-2.8.0.

We require wxPython 2.6 at the moment.

> If I get the latest SVN of the enthought tool suite, go to enthought/src/lib/enthought/traits,
> and build with
> python setup.py build_src build_clib build_ext --inplace
> as suggested in the enthought wiki, and then add enthought/src/lib to my
> PYTHONPATH, then your snippet fails with
> --- begin error message ---
> Traceback (most recent call last):
>   File "prova.py", line 5, in ?
> class Camera(HasTraits):
> NameError: name 'HasTraits' is not defined

Hmm, it works for me. Are you sure that your build is being correctly picked up?
Import enthought, then print enthought.__file__.

> Last, I see that matplotlib includes some enthought/traits
> code, but not the ui frontends. Why is that? Is the matplotlib traits usable?

No, in fact I don't believe it was used at all. It was going to be experimented
with, but I don't think that ever progressed anywhere.

> As you can see, I'm very confused... if only there was a traits Python
> egg...

There are, but only binaries for win32 at the moment. Building from source on OS
X should be straightforward, though.


Python 2.4 from www.python.org should work similarly.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the Numpy-discussion mailing list