惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
GbyAI
GbyAI
爱范儿
爱范儿
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
罗磊的独立博客
Recent Announcements
Recent Announcements
博客园 - 司徒正美
M
MIT News - Artificial intelligence
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog RSS Feed
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网

博客园 - swordzj

安装qt5的运行环境 四舍六入五成双 用批处理在指定目录启动Notebook 华为S6700交换机的命名规则 给服务器来点压力 配置dovect监听多个端口 OpenSSH 9.2P1 aarch64 编译RPM包及升级处理过程 php7.4 注意事项 不重启服务器在线扩容FCSAN存储 WSUS安装后部署报CLR20错误 NFS服务端口转发 注册表模拟修改Wsus配置 Linux下删除大量文件 Seafile社区版集成Office Online Server实现office文件预览 Exchange 域用户无权管理邮箱 阿里云ECS(Centos)开启X11的步骤 微软官方提供的免费正版 Windows 8.1/Win10/7/XP/Vista 操作系统虚拟机镜像下载 在VS2012下静态链接MFC的问题 扩展BindingList,防止增加、删除项时自动更新界面而不出现“跨线程操作界面控件 corss thread operation”异常 【转】开源软件是否真的如我们想象中的那样安全?
从源码编译PyQt5的过程
swordzj · 2026-05-06 · via 博客园 - swordzj

在网上看了许多教程,都要安装sip模块再进行编译,但新的sip模块执行命令与之前有较大区别,最后还是看了官方文档才成功,下面把官方文档抄下面,做个记录。

1、安装编译工具

The solution to all these issues is to use the pyqt-bundle program to bundle a copy of your own Qt installation with your commercial PyQt5. This will produce a new wheel that you can distribute easily to your developers.

pyqt-bundle is part of PyQt-builder. To install it, run:

The documentation can be found here.

To uninstall the commercial version, run:

pip uninstall PyQt5-commercial

Building PyQt5

Once you have downloaded the sdist from PyPI, unpack it and change directory to its top level directory (i.e. the one containing the pyproject.toml file.

If you are building the commercial version of PyQt5 then copy the pyqt-commercial.sip license file to the sip sub-directory.

To build and install PyQt5, run:

In order to see all the available command line options, run:

sip-install -h

2、安装pyqt5-sip模块

Building the sip Module

It is not necessary to install the PyQt5.sip module before building PyQt5 but it must be installed before PyQt5 can be used.

The module is built using setuptools and is available from the PyQt5-sip project at PyPI. It uses setuptools as its build system and can be installed by pip or you can also unpack the sdist and install it by running its setup.py script.