Themerius
Themerius

Reputation: 1911

enthought imports: enthought.traits.api vs traits.api

In the library is traits imported this way:

from enthought.traits.api import Int, Float
# and the other bad thing:
from enthought.traits.ui.api import View

But I've installed traits via pip (pip install traits), and in this version traits are imported this way:

from traits.api import Int, Float
# here is
from traitsui.api import View

What a mess!

How can I use enthougt.traits etc.? Or how I can create a simple wrapper, so that I get an pseudo-enthought-module?

(I've also tried to pip install ets, but not all packages want compile.)

Upvotes: 2

Views: 1593

Answers (1)

cgohlke
cgohlke

Reputation: 9437

Install the etsproxy (github) module for backwards compatibility.

Upvotes: 3

Related Questions