[python学习笔记] pyinstaller打包pyqt5程序无法运行

问题

pyinstaller打包的pyqt5程序在部分电脑上会失败。用户截图提示下边错误日志

无法定位程序输入点 ucrtbase.terminate 于动态链接库 api-ms-win-crt-runtime-l1-1-0.dll 上

以及

Error loading Python DLL: C:Users***python35.dll (error code 127)

解决方案

查找一通之后,在stackoverflow找到了两个解决方案

  • Install the Windows 10 SDK and add the ucrt DDL dirs to your system path (C:Program FilesWindows Kits10Redistucrt or C:Program Files (x86)Windows Kits10RedistucrtDLLsx64 depending on your system) before building
  • Use Python 3.4 to build instead of 3.5+

  • 安装windows sdk 这个没试
  • 把python从 3.5 降为 3.4(这个办法解决的)

其实发现在无法运行的机器上,360修复系统一下就好... 360...

python3.4无法安装pyqt5(再坑)

换成python3.4之后,使用 pyqt5,告诉无法找到对应版本的 sip。跪了

找了一圈,发现可以使用对应版本的pyqt5的exe安装版搞定

另附3.4的下载之后没有的designer.exe 的 模块 安装包

原文地址:https://www.cnblogs.com/boliu/p/7574804.html