V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
luckit
V2EX  ›  Python

PyQt5 Pyinstaller 打包 exe 提示 failed to execute script

  •  
  •   luckit · 2018-03-13 15:03:57 +08:00 · 5346 次点击
    这是一个创建于 2453 天前的主题,其中的信息可能已经有所发展或是发生改变。

    系统环境为: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 上运行测试
    所以无奈只能用虚拟机,却碰到了这个问题
    希望大佬们能出手相助,不胜感激

    2 条回复    2018-03-28 10:35:43 +08:00
    GrayLand119
        1
    GrayLand119  
       2018-03-28 09:22:08 +08:00
    win10 64 位 虚拟机 py3.6.3 pyinstaller3.3.1 遇到同样错误
    GrayLand119
        2
    GrayLand119  
       2018-03-28 10:35:43 +08:00
    解决了, 有个 Python 库没有在虚拟机上安装
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2662 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 01:46 · PVG 09:46 · LAX 17:46 · JFK 20:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.