PyQt5 Pyinstaller 打包 exe 提示 failed to execute script

2018-03-13 15:03:57 +08:00
 luckit

系统环境为:win7 32 位虚拟机
python 3.5.2
pyinstaller 3.3.1
PyQt5.9

python 文件在未打包时可运行
但是-w 打包后提示: failed to execute script DKExam

打包时情况如下:

C:\Users\xxx\Documents\exam>pyinstaller DKExam.py -w
3406 INFO: PyInstaller: 3.3.1
3406 INFO: Python: 3.5.2
3407 INFO: Platform: Windows-Vista-6.0.6000-SP0
3408 INFO: wrote C:\Users\xxx\Documents\exam\DKExam.spec
3758 INFO: UPX is not available.
3771 INFO: Extending PYTHONPATH with paths
['C:\\Users\\xxx\\Documents\\exam', 'C:\\Users\\xxx\\Documents\\exam']
3771 INFO: checking Analysis
7792 INFO: checking PYZ
8021 INFO: checking PKG
8028 INFO: Building because C:\Users\xxx\Documents\exam\build\DKExam\DKExam.exe.
manifest changed
8028 INFO: Building PKG (CArchive) out00-PKG.pkg
8733 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
8735 INFO: Bootloader c:\users\xxx\appdata\local\programs\python\python35-32\lib
\site-packages\PyInstaller\bootloader\Windows-32bit\runw.exe
8736 INFO: checking EXE
8758 INFO: Building because manifest changed
8759 INFO: Building EXE from out00-EXE.toc
8883 INFO: Appending archive to EXE C:\Users\xxx\Documents\exam\build\DKExam\DKE
xam.exe
9025 INFO: Building EXE from out00-EXE.toc completed successfully.
9029 INFO: checking COLLECT
WARNING: The output directory "C:\Users\xxx\Documents\exam\dist\DKExam" and ALL
ITS CONTENTS will be REMOVED! Continue? (y/n)y
12541 INFO: Removing dir C:\Users\xxx\Documents\exam\dist\DKExam
14092 INFO: Building COLLECT out00-COLLECT.toc
44921 INFO: Building COLLECT out00-COLLECT.toc completed successfully.

在 64 位 win10 的物理机上打包可行
但是由于物理机是 64 位 Python,打包后要在32 位无 python 环境 win7 上运行测试
所以无奈只能用虚拟机,却碰到了这个问题
希望大佬们能出手相助,不胜感激

5343 次点击
所在节点    Python
2 条回复
GrayLand119
2018-03-28 09:22:08 +08:00
win10 64 位 虚拟机 py3.6.3 pyinstaller3.3.1 遇到同样错误
GrayLand119
2018-03-28 10:35:43 +08:00
解决了, 有个 Python 库没有在虚拟机上安装

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/437624

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX