Python 错误:此版本的PyQt5需要sip 4.19.1或更高版本

Python 错误:此版本的PyQt5需要sip 4.19.1或更高版本,python,qt,pyqt,qt5,Python,Qt,Pyqt,Qt5,我正在尝试构建PyQt5,但是,我不断得到一个错误,即它需要sip 4.19.1或更高版本 我试过使用--sip“,--sipdir”和--sipindir”,但这些似乎都不起作用 我通过运行“python configure.py”->“nmake”->“nmake install”安装了sip,运行这些命令时没有出现错误 C:\Users\Tarzan\Downloads\sip-4.19.2>nmake install Microsoft (R) Program Maintenan

我正在尝试构建PyQt5,但是,我不断得到一个错误,即它需要sip 4.19.1或更高版本

我试过使用--sip“,--sipdir”和--sipindir”,但这些似乎都不起作用

我通过运行“python configure.py”->“nmake”->“nmake install”安装了sip,运行这些命令时没有出现错误

C:\Users\Tarzan\Downloads\sip-4.19.2>nmake install

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cd sipgen
        "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe" install

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        copy /y sip.exe C:\ProgramData\Anaconda3\sip.exe
        1 file(s) copied.
        cd siplib
        "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe" install

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        copy /y sip.pyd C:\ProgramData\Anaconda3\Lib\site-packages\sip.pyd
        1 file(s) copied.
        copy /y C:\Users\Tarzan\Downloads\sip-4.19.2\siplib\sip.h C:\ProgramData\Anaconda3\include\sip.h
        1 file(s) copied.
        copy /y C:\Users\Tarzan\Downloads\sip-4.19.2\sip.pyi C:\ProgramData\Anaconda3\Lib\site-packages\sip.pyi
        1 file(s) copied.
        copy /y sipconfig.py C:\ProgramData\Anaconda3\Lib\site-packages\sipconfig.py
        1 file(s) copied.
        copy /y C:\Users\Tarzan\Downloads\sip-4.19.2\sipdistutils.py C:\ProgramData\Anaconda3\Lib\site-packages\sipdistutils.py
        1 file(s) copied.
下面是运行配置文件的尝试

C:\Users\Tarzan\Downloads\PyQt5_gpl-5.8.2>python configure.py
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
This is the GPL version of PyQt 5.8.2 (licensed under the GNU General Public
License) for Python 3.6.0 on win32.

Type 'L' to view the license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Found the license file pyqt-gpl.sip.
Error: This version of PyQt5 requires sip 4.19.1 or later.
我已经在谷歌上搜索了一到两个小时了,但发布的解决方案似乎都不起作用


NB:使用Visual C++ 2015 X64原生构建工具命令PROTT/P>< P>,当我尝试运行<代码> Python Cuffur.py-SIP >之前,我已经选择了错误的路径。但是现在它正在工作。

您是否对SIP和PyQt都使用VC++命令提示符?如果键入
where python
,输出是什么?SIP正在安装到Anaconda目录中,可能您在系统上安装了另一个python,例如C:\Python36@user3419537谢谢您的回复。是的,我对SIP和PyQt使用了相同的VC++cmd。当我键入python所在位置时的输出
C:\ProgramData\Anaconda3\python.exe
,我当前也没有安装其他python。如果从python导入sip,并打印
sip.sip\u VERSION\u STR
?@user3419537,它会打印
4.19.2
尝试通过
--sip
(或者确保sip是路径中的第一个)