求助 pyinstaller 打包的 exe 在 xp 下报错 - V2EX
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
alittletrain
V2EX    Python

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

  •  
  •   alittletrain 2016-08-04 09:58:14 +08:00 8114 次点击
    这是一个创建于 3362 天前的主题,其中的信息可能已经有所发展或是发生改变。

    模块如下:

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

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

    13 条回复    2019-08-14 10:48:44 +08:00
    jeremaihloo
        1
    jeremaihloo  
       2016-08-04 10:26:03 +08:00
    这意思是说 XP 的 kernel32.dll 没有这个函数之类的?不懂,只知道 kernel32.dll 是 win32 的核心 dll ,帮顶
    iVanilla
        2
    iVanilla  
       2016-08-04 10:37:44 +08:00
    用 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
       2016-08-04 10:42:55 +08:00
    @iVanilla 不支持哪个函数??在我的源码里吗?
    iVanilla
        4
    iVanilla  
       2016-08-04 10:45:38 +08:00
    @alittletrain 就是 Getfinalpathnamebyhandlew 啊,这个是 Vista 加入的 API 。
    alittletrain
        5
    alittletrain  
    OP
       2016-08-04 11:10:23 +08:00
    @iVanilla 那我的源代码怎么修改呢?
    devzero
        6
    devzero  
       2016-08-04 11:23:38 +08:00 via Android
    同遇到这个情况,那么如何用 py2exe 打包才能在 xp 下运行?
    alittletrain
        7
    alittletrain  
    OP
       2016-08-04 11:34:53 +08:00
    @devzero 我猜可以需要用 py2
    iVanilla
        8
    iVanilla  
       2016-08-04 12:20:23 +08:00
    @alittletrain @devzero 你们用的最新版? Python3.5 不支持 XP ,需要 VIsta 以上系统。
    alittletrain
        9
    alittletrain  
    OP
       2016-08-04 13:08:41 +08:00
    @iVanilla 我在 xp 下 用 2.7 打包后 提示 failed to execute script xxx
    dowern
        10
    dowern  
       2016-08-04 14:58:44 +08:00
    前天遇上同样的问题, 最好的办法是开 XP 虚拟机, 安装 xp 对应 32 位或 64 位 python 和依赖包(和开发环境一致), 然后运行正常再打包, 基本就不会再出现这问题.

    需要 Python3.4, 3.5 不支持 XP
    alittletrain
        11
    alittletrain  
    OP
       2016-08-04 16:20:04 +08:00
    @dowern 我用 xp python 2.7 32 位 但是打包后 提示 failed to execute script xxx
    shanpower
        12
    shanpower  
       2018-04-08 23:21:27 +08:00 via Android
    你解决了没
    @alittletrain
    Manito
        13
    Manito  
       2019-08-14 10:48:44 +08:00
    单位办公电脑几乎都是 xp 系统,因为资料太多也不好升级,自己开发的程序无法运行,也是提示 无法定位程序输入点 Getfinalpathnamebyhandlew 于动态链接库 kernel32.dll ,求除了升级操作系统之外的解决办法。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     914 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 19:49 PVG 03:49 LAX 12:49 JFK 15:49
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86