• 利用pyinstaller发布不依赖python解释器的可执行exe


    现在打包app.py,从Windows命令提示符(cmd)运行:

    pyinstaller.exe --onefile --windowed app.py

    就这么简单。

    如果打包成功,最终的可执行文件app.exe和任何相关文件将放在dist目录中,如果该目录不存在,将创建该目录。

    PyInstaller Manual

    Version

    PyInstaller 5.1

    Homepage

    https://pyinstaller.org/

    Contact

    pyinstaller@googlegroups.com

    Authors

    David Cortesi, based on structure by Giovanni Bajo & William Caban, based on Gordon McMillan’s manual

    Copyright

    This document has been placed in the public domain.

    PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules. PyInstaller supports Python 3.7 and newer, and correctly bundles many major Python packages such as numpy, matplotlib, PyQt, wxPython, and others.

    PyInstaller is tested against Windows, MacOS X, and Linux. However, it is not a cross-compiler; to make a Windows app you run PyInstaller on Windows, and to make a Linux app you run it on Linux, etc. x PyInstaller has been used successfully with AIX, Solaris, FreeBSD and OpenBSD but testing against them is not part of our continuous integration tests, and the development team offers no guarantee (all code for these platforms comes from external contributions) that PyInstaller will work on these platforms or that they will continue to be supported.

    Quickstart

    Make sure you have the Requirements installed, and then install PyInstaller from PyPI:

    pip install -U pyinstaller
    

    Open a command prompt/shell window, and navigate to the directory where your .py file is located, then build your app with the following command:

    pyinstaller your_program.py
    

    Your bundled application should now be available in the dist folder.

  • 相关阅读:
    和阿文一起学H5-文字云制作
    uml与数据库设计
    设计模式——面向对象设计原则
    koajs框架解决的问题
    mongodb
    javascript 获取select选中text,2种方法
    带参数跳转
    express表单提交和参数接收4种方式
    ejs模版的4种输出方式
    nodejs事件
  • 原文地址:https://www.cnblogs.com/bonelee/p/16338699.html
Copyright © 2020-2023  润新知