Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ImportError:没有名为PyQt4.QTGUI的模块_Python_Cygwin_Pyqt4 - Fatal编程技术网

Python ImportError:没有名为PyQt4.QTGUI的模块

Python ImportError:没有名为PyQt4.QTGUI的模块,python,cygwin,pyqt4,Python,Cygwin,Pyqt4,我已经安装了PyQt4库,在代码的开头有以下内容 from PyQt4.QtGui import * ...... 当我从windows Python Gui(空闲)运行代码时,它运行得非常好。 但是,当我试图从Cygwin运行代码时,我得到以下错误: ImportError: No module named PyQt4.QTGUI 我能知道这里出了什么问题吗? 谢谢。Cygwin和Windows Python安装是完全分开的,不兼容。为了在Cygwin的Python中使用PyQt4,您需要

我已经安装了PyQt4库,在代码的开头有以下内容

from PyQt4.QtGui import *
......
当我从windows Python Gui(空闲)运行代码时,它运行得非常好。 但是,当我试图从Cygwin运行代码时,我得到以下错误:

ImportError: No module named PyQt4.QTGUI
我能知道这里出了什么问题吗?
谢谢。

Cygwin和Windows Python安装是完全分开的,不兼容。为了在Cygwin的Python中使用
PyQt4
,您需要使用
Python-PyQt4