我是Python的新手并尝试运行Python应用程序。我已经安装了python 2.6,Qt4.8和PyQt4.8。 当我运行这个命令时
python mygui.py
我得到了这个结果
/usr/lib64/python2.6/site-packages/gtk-2.6 gtk/__init__.py:122:
RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
set_interactive(1)
Traceback (most recent call last):
File "mgui.py", line 1069, in <module>
main()
File "mgui.py", line 1053, in main
mWindow = MWindow()
File "mgui.py", line 173, in __init__
self.setPlugin('default', '/')
File "mgui.py", line 365, in setPlugin
self.plugin = self.loadPluginClass(str(name))(str(root), self)
File "mgui.py", line 310, in loadPluginClass
pluginModule = self.loadPluginModule(name, re=re)
File "mgui.py", line 262, in loadPluginModule
module = imp.load_module(name, fp, pathname, description)
File "/hm1/dinesh/moose-master/moose-master/gui/plugins/default.py",
line 822, in <module>
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT, Signal, pyqtSignal
ImportError: cannot import name Signal
我试图找出谷歌中的soln但无法理解。 如果有人能解决我的后续疑问,我将感激不尽 -
1)RuntimeWarning:PyOS_InputHook不能用于交互式使用PyGTK set_interactive(1)
2)ImportError:无法导入名称Signal
提前致谢...
答案 0 :(得分:1)
如果你转到the PyQt4 documentation,你会看到此套餐中有信号,但不是信号。因此,要解决此问题,请转到mgui.py,找到每个Signal
,然后将其替换为SIGNAL。