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

时间:2017-05-04 04:25:29

标签: python qt pyqt qt5

我试图构建PyQt5然而,我不断收到它需要sip 4.19.1或更高版本的错误。

我尝试过使用" - sip"," - sipdir"和" - sip-incdir"但是这些似乎都不起作用。

我通过运行" python configure.py"安装了sip。 - > " NMAKE" - > " nmake install"并且在运行它们时没有错误。

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.

我现在正在谷歌搜索大约一两个小时,所发布的解决方案似乎都没有效果。

注意:使用Visual C ++ 2015 x64本机构建工具命令Promt

1 个答案:

答案 0 :(得分:1)

当我尝试跑python configure.py --sip <path>时,我选择了错误的路径。现在它正在发挥作用。