LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-27-2010, 07:15 AM   #1
Mchraibi
LQ Newbie
 
Registered: Jul 2010
Location: Germany
Distribution: Debian
Posts: 3

Rep: Reputation: 0
Python: No module named enthought.traits.api


Hallo,
I just try to use the python package Traits. Following code:

Code:
from enthought.traits.api import HasTraits,Int,Float,Str,Property

class Person(HasTraits):
   name = Str
   age = Int
   height = Float
   weight = Float

p = Person(name="Billy",age=18,height=2.,weight=90)
#p.height = "Raspberries"   #As height expects a float, this gives an error
p.configure_traits()

print p.name,p.age,p.height,p.weight
This just doesn't work giving following Errors back:

Code:
Traceback (most recent call last):
  File "traits.py", line 1, in <module>
    from enthought.traits.api import HasTraits,Int,Float,Str,Property
ImportError: No module named enthought.traits.api

I" m using Debian (squeeze/sid) so I tried to apt-get install python-enthought-traits-ui, python-enthought-traits, python-traits, python-traitsgui. The problem is those packages have unmet dependencies so I' m blocked here.

Any Hint or Idea how?

Many thanks!!
 
Old 07-27-2010, 09:50 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Is your package manager database up to date? Assuming that it is, you might simply have to track down the dependencies manually----OR: Is it possible that you need to enable some additional repositories?
 
Old 07-28-2010, 03:45 AM   #3
Mchraibi
LQ Newbie
 
Registered: Jul 2010
Location: Germany
Distribution: Debian
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,
Up to date yes. I' m trying to solve the independences manually.

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Portage API crosstalk Gentoo 1 07-17-2010 03:52 PM
"ImportError: No module named gobject", Exaile fails to run. Python problem. kummiliim Linux - Software 1 12-11-2008 02:12 PM
python update - Unable to load GTK2 Python bindings: No module named gtk itpedersen Linux - Software 2 10-03-2008 04:44 AM
Querying with the RPM Python API 7ofClubs Programming 1 06-11-2007 10:56 AM
Python + metaweblog api vharishankar Programming 2 11-24-2006 09:47 PM


All times are GMT -5. The time now is 08:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration