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
garth
V2EX  ›  Python

PyInstaller 打包出来的 exe 不支持中文目录及中文名称!

  •  
  •   garth ·
    imgarth · 2014-05-22 23:37:30 +08:00 via Android · 13523 次点击
    这是一个创建于 3628 天前的主题,其中的信息可能已经有所发展或是发生改变。
    将exe文件重命名成中文名称或放在有中文的目录里,就无法运行了。有解决办法么?
    15 条回复    2015-06-11 18:56:02 +08:00
    buliugu
        1
    buliugu  
       2014-05-23 00:40:33 +08:00
    换成cx_Freeze可破
    akfish
        2
    akfish  
       2014-05-23 00:42:22 +08:00
    很好,点赞。
    最看不惯中文目录名了。
    lm902
        3
    lm902  
       2014-05-23 03:16:19 +08:00
    用ClickOnce把Python打包进去然后做成在线安装吧
    pc10201
        4
    pc10201  
       2014-05-23 09:33:16 +08:00
    PyInstaller打包出来的程序最好别重命名
    PyInstaller 2.1打包出来的exe有bug,不能在中文目录下运行
    PyInstaller 2.0的没有此问题
    lijanjun
        5
    lijanjun  
       2014-05-24 09:33:20 +08:00
    因为他的bootloader程序里,以为windows api里W结尾的接口的W是指utf8,楼主有空可以改下bootloader代码重编一下。
    garth
        6
    garth  
    OP
       2014-05-24 11:01:33 +08:00
    lijanjun
        7
    lijanjun  
       2014-05-24 13:18:18 +08:00
    @garth 这是我写的,你试过没? 管不管用?
    garth
        8
    garth  
    OP
       2014-05-24 14:14:35 +08:00 via Android
    @lijanjun 试了develop分支的,不管用。
    lijanjun
        9
    lijanjun  
       2014-05-24 15:47:53 +08:00
    @garth 我这边用32位的python, 是管用的。能不能提供点错误提示什么的,帮助完善一下?
    tntC4stl3
        10
    tntC4stl3  
       2014-05-26 17:13:51 +08:00
    貌似换成py2exe来打包也支持中文目录
    只是之前我发现打包出来的wxPython程序,界面比用pyinstaller打包出来的要丑
    不知道为什么。
    garth
        11
    garth  
    OP
       2014-08-04 14:51:26 +08:00
    @lijanjun 64位的python,在64位win8下测试的。
    dkw72n
        12
    dkw72n  
       2014-09-01 23:24:56 +08:00
    @garth 之前我只编译提交了32位的,如果你直接取库里的,不行是正常的。
    我刚编了个64位的提交了: https://github.com/dkw72n/pyinstaller/commit/e028c5b7f1d6ba1e85bf802f5ca5b629b574cf20
    你可以试试,或者自己编译一下~

    ps,我就是@lijanjun,那个账号密码和注册邮箱都忘了-,-

    pps,抱歉挖坟了
    garth
        13
    garth  
    OP
       2014-09-02 23:53:11 +08:00
    @dkw72n 哈哈……这么久了还回复,赞!有时间再试下。
    cmsee
        14
    cmsee  
       2014-10-04 19:22:38 +08:00
    是的不支持。
    caimaoy
        15
    caimaoy  
       2015-06-11 18:56:02 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4462 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:34 · PVG 13:34 · LAX 22:34 · JFK 01:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.