python - 错误 : This version of PyQt5 requires sip 4. 19.1 或更高版本

标签 python qt pyqt qt5

我正在尝试构建 PyQt5,但是,我不断收到它需要 sip 4.19.1 或更高版本的错误。

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

我通过运行“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.

我已经在谷歌上搜索了大约一两个小时,但发布的解决方案似乎都不起作用。

注意:使用了 Visual C++ 2015 x64 native 构建工具命令提示符

最佳答案

结果当我尝试运行python configure.py --sip <path>时我以前选择了错误的道路。但现在它正在工作。

关于python - 错误 : This version of PyQt5 requires sip 4. 19.1 或更高版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43773875/

相关文章:

python - 如何在 Django View 中获取 POST 请求值?

c++ - Qt 5 - 如何实时从子对话框发回数据

python - 如何将标签置于 QWizardPage 的中心?

python - 如何控制 QToolBar 中的 QAction 按钮间距?

python - 如果并发读/写访问会发生什么?

python - 如何在python列表中的值之间进行组合?

c++ - 从另一个表单处理 QTextEdit

python - 正确使用 PyQt 信号

python - 如何使用 Boto3 在 AWS 实例上执行命令

c++ - QGraphicsScene 在 QGraphicsView 中奇怪地缩放