1

我有一台新机器(Windows 10)并且正在运行 Python 2.7.13(64 位)。我已经设法安装了几个模块,但现在我遇到了 sip 问题,我需要它才能安装 PyQt4。

我下载了 zip 文件,将文件夹解压缩到 C:\Python27\Lib\sip-4.19.3。然后我打开一个 cmd 并 cd 进入 C:\Python27\Lib\sip-4.19.3 并运行:

python configure.py

我在 cmd 窗口中得到了这个:

C:\Python27\Lib\sip-4.19.3>python configure.py
This is SIP 4.19.3 for Python 2.7.13 on win32.
The SIP code generator will be installed in C:\Python27.
The sip module will be installed in C:\Python27\Lib\site-packages.
The sip.pyi stub file will be installed in C:\Python27\Lib\site-packages.
The sip.h header file will be installed in C:\Python27\include.
The default directory to install .sip files in is C:\Python27\sip.
Creating siplib\sip.h...
Creating siplib\siplib.c...
Creating siplib\siplib.sbf...
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...

C:\Python27\Lib\sip-4.19.3>

但是当我打开 IDLE 并尝试导入 sip 时,我得到:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import sip
ImportError: No module named sip

我打印了我的模块:

['pillow==4.0.0', 'pip==9.0.1', 'setuptools==28.8.0', 'wheel==0.30.0']

所以我知道它不存在,但我不确定在运行 configure.py 后我应该做什么。

我在网上看了看,可能是我需要在 configure.py 运行后构建 sip,所以我尝试在初始配置后输入 make 但得到了这个:

C:\Python27\Lib\sip-4.19.3>make
'make' is not recognized as an internal or external command,
operable program or batch file.

C:\Python27\Lib\sip-4.19.3>

安装文档有点模棱两可,并做了一些假设,所以我想知道在 configure.py 之后我应该做什么,因为我有点难过。

谢谢

4

0 回答 0