如何安装SIP makefile以使用PyQt

How do I install SIP makefile to use PyQt?

本文关键字:makefile PyQt SIP 何安装 安装      更新时间:2023-10-16

我想安装sip与PyQt一起使用。

  1. 我已打开sip下载
  2. 我运行了Windows命令提示符,并将目录更改为C:\Python\sip\
  3. 我运行了configure.py脚本,我确实先尝试了python configure.py,但因为我将sip文件夹解压缩到C:\Python中,所以我无法获得识别Python外壳的命令行
  4. 这在命令提示符下返回了makefile,然后我无法使用make,它只是给了我错误'make' is not recognized
  5. 我研究了一下,认为我可以通过使用minGW来解决这个问题
  6. 现在我的命令提示符显示:

    C:Pythonsip>configure.py --platform win32-g++ This is SIP 4.17 for Python 2.7.11 on win32. The SIP code generator will be installed in C:Python27. The sip module will be installed in C:Python27Libsite-packages. The sip.h header file will be installed in C:Python27include. The default directory to install .sip files in is C:Python27sip. Creating siplibsip.h... Creating siplibsiplib.c... Creating siplibsiplib.sbf... Creating sipconfig.py... Creating top level Makefile... Creating sip code generator Makefile... Creating sip module Makefile...

  7. 然后我运行make,得到

    C:Pythonsip>make 'make' is not recognized as an internal or external command, operable program or batch file.

我已经搜索了Stack,有些已经接近答案,但还没有什么能让我完全找到答案。

我正在考虑下载visualstudio,因为我一直在读到你应该在windows上运行makefile。

这是正确的还是我看错地方了?

所以我找到了使用make的正确方法。我必须设置我的路径以包括mnGW并使用:mingw32-makemingw32-make install

具有讽刺意味的是,我在python wiki上发现了这一点!

https://wiki.python.org/moin/BuildPyQt4Windows