我试着用没有iPython的热情包装,遮篷。在
我下载了traitsui,enthough…等软件包。但是,当我把文件夹放在/Lib中时,它会回调ctraits错误。在
在我从https://github.com/enthought/ctraits下载ctraits之后
还有问题。当我导入时热情.traits.api或者trais.api公司在
错误消息是
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import enthought.traits.api
File "C:\Python27\lib\enthought\traits\api.py", line 3, in <module>
from traits.api import *
File "<pyshell#0>", line 1, in <module>
import enthought.traits.api
File "C:\Python27\lib\enthought\traits\api.py", line 3, in <module>
from traits.api import *
File "C:\Python27\lib\traits\api.py", line 107, in <module>
from traitsui import view_elements
File "C:\Python27\lib\traitsui\view_elements.py", line 201, in <module>
class SearchStackItem ( HasStrictTraits ):
File "C:\Python27\lib\traits\has_traits.py", line 426, in __new__
mhto = MetaHasTraitsObject( cls, class_name, bases, class_dict, False )
File "C:\Python27\lib\traits\has_traits.py", line 497, in __init__
value = _check_trait( value )
File "C:\Python27\lib\traits\has_traits.py", line 340, in _check_trait
return trait.as_ctrait()
File "C:\Python27\lib\traits\trait_handlers.py", line 597, in as_ctrait
trait.set_validate( validate )
File "C:\Python27\lib\traits\ctraits.py", line 714, in set_validate
raise ValueError("The argument must be a tuple or callable")
ValueError: The argument must be a tuple or callable
有没有人有相关的经验来使用特性,热情的包装没有遮篷或Ipython?在
要安装ETS,最好的链接是http://code.enthought.com/downloads/。如果您不想安装Canopy,最简单的方法是使用pip或easy-tu安装PyPI中的Traits。最手动的方法是克隆整个存储库(在https://github.com/enthought/traits)并使用
这需要一个C编译器。下载单个文件并手动将其放置在某个位置很可能失败。在
最后一点要注意的是:enthown名称空间已被弃用,现在您可以/应该直接导入traitsui或chaco,例如:
^{pr2}$希望这有帮助。在
相关问题 更多 >
编程相关推荐