从源安装 PyQt5:无法导入 PyQt5.sip [英] Installing PyQt5 from sources: Unable to import PyQt5.sip

查看:77
本文介绍了从源安装 PyQt5:无法导入 PyQt5.sip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从源代码构建 PyQt5.我正在运行 fedora 28 并通过 dnf 安装了 Qt5.按照 this 安装 Sip 似乎没问题.但是当我尝试配置 PyQt 时出现此错误:

I'm trying to build PyQt5 from the sources. I'm running fedora 28 and I installed Qt5 via dnf. Installing Sip following this seems OK. But when i try to configure PyQt i got this error:

# python3 configure.py -q /usr/bin/qmake-qt5
Querying qmake about your Qt installation...
Error: Unable to import PyQt5.sip. Make sure you have configured SIP to
create a private copy of the sip module.

根据 doc 我做了:

# python3 configure.py --sip-module private.sip
# python3 configure.py -q /usr/bin/qmake-qt5 -n private.sip

但我仍然收到错误消息.所以我猜我没有正确使用它.有什么建议吗?

But i still get the error. So I'm guessing I'm not using it properly. Any suggestions ?

PS:我知道(我也知道)它可以通过 pip 来完成,但我面临着与 这里

P.S: I know (and i did) that it can be done via pip but i'm facing the same problem than here

推荐答案

您是否正在尝试安装 sip-4.19.10 和 PyQt5_gpl-5.11.1?

Are you trying to install sip-4.19.10 and PyQt5_gpl-5.11.1?

尝试结合使用 sip-4.19.8 和 PyQt5_gpl-5.10.1.

Try a combination of sip-4.19.8 and PyQt5_gpl-5.10.1.

https://sourceforge.net/projects/pyqt/files/PyQt5/https://sourceforge.net/projects/pyqt/files/sip/

这篇关于从源安装 PyQt5:无法导入 PyQt5.sip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆