【发布时间】:2018-01-24 19:23:53
【问题描述】:
我在安装 PyQt4 包时遇到了问题。我已经阅读了许多有关此的文档,但仍然没有弄清楚。所以我的第一个问题是当我下载 PyQt4 zip 失败时,我必须在哪里提取它?
我尝试将它解压缩到 \Lib\site-packages,然后从那里运行 PS 并使用命令“python configure-ng.py”然后它给我一个错误“错误:确保你有一个在你的 PATH 上运行 Qt qmake。”虽然我已经安装了 QT 软件。
我发现我的系统中有两个 qmake 文件夹。一个位于“Qt\Tools\QtCreator\share\qtcreator\templates\wizards\projects”,另一个位于“Qt\Tools\Preview\Qt Creator 4.5.0 rc1\share\qtcreator\templates\wizards\projects”。我还尝试将“qmake”文件夹复制到 PyQt4 文件所在的目录,但仍然没有。
更新:所以我放弃了使用 configure-ng.py 失败的尝试安装,并开始尝试使用 configure.py 添加软件包。然后首先我收到一个错误“没有名为'sipconfig'的模块”。 我在互联网上发现它是由它引起的,因为没有安装 SIP,你需要像 this 这样的 installid 。然后我遇到了一个错误“make is not Recognized as an internal or external command python”所以我安装了MinGW C编译器。现在如果我运行它 C:\PATH\main.exe 我得到一个错误:
PS G:\Programmeerimine\uus\Lib\site-packages\PyQt4_gpl_win-4.12.1\sip 4.19.7> C:\MinGW\bin\make.exe
make[1]: Entering directory 'G:/Programmeerimine/uus/Lib/site-packages/PyQt4_gpl_win-4.12.1/sip-4.19.7/sipgen'
gcc -c -O2 -Wall -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c
gcc: error: CreateProcess: No such file or directory
Makefile:29: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: Leaving directory 'G:/Programmeerimine/uus/Lib/site-
packages/PyQt4_gpl_win-4.12.1/sip-4.19.7/sipgen'
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 2
【问题讨论】:
标签: python python-3.x pyqt pyqt4 mingw