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

在 windows 下,如何把 python 也一起打包到应用里?

  •  
  •   ffts · 2014-02-22 21:19:42 +08:00 · 3991 次点击
    这是一个创建于 3715 天前的主题,其中的信息可能已经有所发展或是发生改变。
    拿python写了个带界面的工具,界面用的wxpython,给公司的其他同事用,linux的还好说,都是弄技术的,mac的也有一部分,大概都会自己鼓捣,不过有一些用windows和mac的同事不是做技术的,让他们去装python和wxpython,好像有些麻烦,不过我试了下,windows下装了python和wxpython后,双击.py文件也可以直接运行,mac没有,具体就不知道了...
    不过我想能不能把python也一起打包,尤其是windows下,我看sublime text 也是用python写的,那个就不需要再装一个python,看它的路径下有个python3.3.zip,应该就是这个?
    11 条回复    1970-01-01 08:00:00 +08:00
    kid177
        1
    kid177  
       2014-02-22 21:21:00 +08:00   ❤️ 1
    py2exe
    这东西不知道是不是你想要的。
    ffts
        2
    ffts  
    OP
       2014-02-22 21:35:02 +08:00
    @kid177 好像就是需要这么个东西!我去试试,非常感谢!
    banbanchs
        3
    banbanchs  
       2014-02-22 21:45:15 +08:00   ❤️ 1
    zhwei
        4
    zhwei  
       2014-02-22 21:50:50 +08:00
    pyinstaller
    zhwei
        5
    zhwei  
       2014-02-22 21:52:10 +08:00   ❤️ 1
    pyinstaller

    要分别打包,比如 xp 和 win8 , 32位和64位
    ffts
        6
    ffts  
    OP
       2014-02-22 21:55:33 +08:00
    @banbanchs
    @zhwei
    原来有这么多工具可用,我都去试试
    tioover
        7
    tioover  
       2014-02-22 23:12:29 +08:00   ❤️ 1
    楼上的工具都老啦!老啦!不好用啦!cx_Freeze!!!
    ffts
        8
    ffts  
    OP
       2014-02-22 23:23:06 +08:00
    @tioover 呃,又有一个!我一个一个来,刚试完py2exe...
    tioover
        9
    tioover  
       2014-02-22 23:47:43 +08:00
    @ffts 真的,你看很多都已经好几年没更新了,我这个代表先进生产力。
    pythonee
        10
    pythonee  
       2014-02-23 11:21:37 +08:00
    @tioover 这个是你写的吗
    ldehai
        11
    ldehai  
       2014-02-23 18:36:37 +08:00   ❤️ 1
    我写过一个教程,可以看看,用的是pyinstaller. http://ldehai.com/blog/2013/09/22/pyinstaller-matplotlib-scipy/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3674 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:27 · PVG 18:27 · LAX 03:27 · JFK 06:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.