V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
alittletrain
V2EX  ›  Python

求助 pyinstaller 打包的 exe 在 xp 下报错

  •  
  •   alittletrain · Aug 4, 2016 · 8383 views
    This topic created in 3559 days ago, the information mentioned may be changed or developed.

    模块如下:

    
    from tkinter import *
    
    import tkinter
    import datetime
    import time
    import win32clipboard
    import tkinter.messagebox
    

    在 xp 下 提示 无法定位程序输入点 Getfinalpathnamebyhandlew 于动态链接库 kernel32.dll

    13 replies    2019-08-14 10:48:44 +08:00
    jeremaihloo
        1
    jeremaihloo  
       Aug 4, 2016
    这意思是说 XP 的 kernel32.dll 没有这个函数之类的?不懂,只知道 kernel32.dll 是 win32 的核心 dll ,帮顶
    iVanilla
        2
    iVanilla  
       Aug 4, 2016
    用 Google 搜索 Getfinalpathnamebyhandlew 即可。
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa364962%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
    https://mail.python.org/pipermail/python-dev/2015-July/140823.html

    Minimum supported client
    Windows Vista [desktop apps only]

    所以说 XP 是不支持这个函数的,也就运行不了。
    alittletrain
        3
    alittletrain  
    OP
       Aug 4, 2016
    @iVanilla 不支持哪个函数??在我的源码里吗?
    iVanilla
        4
    iVanilla  
       Aug 4, 2016
    @alittletrain 就是 Getfinalpathnamebyhandlew 啊,这个是 Vista 加入的 API 。
    alittletrain
        5
    alittletrain  
    OP
       Aug 4, 2016
    @iVanilla 那我的源代码怎么修改呢?
    devzero
        6
    devzero  
       Aug 4, 2016 via Android
    同遇到这个情况,那么如何用 py2exe 打包才能在 xp 下运行?
    alittletrain
        7
    alittletrain  
    OP
       Aug 4, 2016
    @devzero 我猜可以需要用 py2
    iVanilla
        8
    iVanilla  
       Aug 4, 2016
    @alittletrain @devzero 你们用的最新版? Python3.5 不支持 XP ,需要 VIsta 以上系统。
    alittletrain
        9
    alittletrain  
    OP
       Aug 4, 2016
    @iVanilla 我在 xp 下 用 2.7 打包后 提示 failed to execute script xxx
    dowern
        10
    dowern  
       Aug 4, 2016
    前天遇上同样的问题, 最好的办法是开 XP 虚拟机, 安装 xp 对应 32 位或 64 位 python 和依赖包(和开发环境一致), 然后运行正常再打包, 基本就不会再出现这问题.

    需要 Python3.4, 3.5 不支持 XP
    alittletrain
        11
    alittletrain  
    OP
       Aug 4, 2016
    @dowern 我用 xp python 2.7 32 位 但是打包后 提示 failed to execute script xxx
    shanpower
        12
    shanpower  
       Apr 8, 2018 via Android
    你解决了没
    @alittletrain
    Manito
        13
    Manito  
       Aug 14, 2019
    单位办公电脑几乎都是 xp 系统,因为资料太多也不好升级,自己开发的程序无法运行,也是提示 无法定位程序输入点 Getfinalpathnamebyhandlew 于动态链接库 kernel32.dll ,求除了升级操作系统之外的解决办法。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   882 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 19:01 · PVG 03:01 · LAX 12:01 · JFK 15:01
    ♥ Do have faith in what you're doing.