推荐学习书目
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
borischenc
V2EX  ›  Python

Python 编辑 Mac 可执行文件 py2app 可以创建 console application 吗?

  •  
  •   borischenc · Mar 29, 2017 · 3904 views
    This topic created in 3375 days ago, the information mentioned may be changed or developed.

    似乎在 windows 上面是可以的,但是 Mac 上面直接套用 windows 的 setup.py 就会出错

    setup.py(windows):

    
    from distutils.core import setup  
    import py2exe  
      
    setup(console=['sakai_getter.py'])  
    

    请问具体有什么办法可以在 Mac 上面也编译出 console application 吗?

    4 replies    2017-03-29 21:09:39 +08:00
    konia
        1
    konia  
       Mar 29, 2017 via iPhone
    试过 pyinstaller 吗
    borischenc
        2
    borischenc  
    OP
       Mar 29, 2017
    @konia
    pyinstaller 编译出来的文件执行的时候会说 ImportError: No module named 'queue'
    不是很清楚为什么
    使用的 python3.5 编写的程序
    Kilerd
        3
    Kilerd  
       Mar 29, 2017
    @borischenc 你没把库也一起打包进去把?
    borischenc
        4
    borischenc  
    OP
       Mar 29, 2017
    @Kilerd 请问要怎么打包进去呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5682 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 03:16 · PVG 11:16 · LAX 20:16 · JFK 23:16
    ♥ Do have faith in what you're doing.