移植了我的特征/ui/chaco/enable/enable 项目从python2到python3,我会遇到以下错误,我有一个错误困难的故障排除。我希望有人可能有一个提出进步的建议。
谢谢!
-db
:(
Traceback (most recent call last):
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/qt4/base_window.py", line 213, in paintEvent
self.handler.paintEvent(event)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/qt4/base_window.py", line 65, in paintEvent
self._enable_window._paint(event)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/abstract_window.py", line 462, in _paint
self._gc = self._create_gc(size)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/enable/qt4/image.py", line 23, in _create_gc
bottom_up = 0)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/__init__.py", line 40, in __init__
bottom_up)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/agg.py", line 888, in __init__
_swig_setattr(self, GraphicsContextArray, 'this', obj)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/agg.py", line 39, in _swig_setattr
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
File "/anaconda3/envs/pybert64/lib/python3.7/site-packages/kiva/agg/agg.py", line 29, in _swig_setattr_nondynamic
method = class_type.__swig_setmethods__.get(name, None)
AttributeError: type object 'GraphicsContextArray' has no attribute '__swig_setmethods__'
我的包装版本:
dbanas@davids-mbp:~/Documents/Projects/PyBERT
$ conda list | grep 'traitsui|traits|chaco|enable|swig'
chaco 4.8.0 py37_0 local
enable 4.8.0 pyh7b7c402_0 local
swig 3.0.12 h1cb45b9_3
traits 5.1.1 py37h1de35cc_0
traitsui 6.1.1 py_0
这是由于swig版本所致。为了构建 enable 包,swig v4 不工作工作;使用V3。