利用pyinstaller发布不依赖python解释器的可执行exe
现在打包app.py,从Windows命令提示符(cmd)运行:
|
就这么简单。
如果打包成功,最终的可执行文件app.exe和任何相关文件将放在dist目录中,如果该目录不存在,将创建该目录。
PyInstaller Manual
- Version
-
PyInstaller 5.1
- Homepage
- Contact
- 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.
相关文章
- python 在linux系统的安装教程
- python应用-彩票随机码的输出
- python批量下载
- Centos 6.4 安装Python 2.7 python-pip
- Python中利用原始套接字进行网络编程的示例
- Python 字符串_python 字符串截取_python 字符串替换_python 字符串连接
- scrapy笔记——python的时间转换
- Python每日一练(20230317)
- Atitit web httphandler的实现 java python node.js c# net php 目录 1.1. Java 过滤器 servelet1 1.2. Python的
- Atitit python3.0 3.3 3.5 3.6 新特性 Python2.7新特性1Python 3_x 新特性1python3.4新特性1python3.5新特性1值得关注的新特性1Python3.6新特性2 Python2.7新特性Python 2.7的新特性 - 牛皮糖NewPtone - 博客园.html Python 3_x 新特性及10大变化_python_脚本之家.htm
- python程序员都在用到5个酷毙的Python工具
- 卧槽!爱了爱了,这几个Python装逼神器一定要收藏好!
- 快收藏!!整理了100个Python小技巧!!
- Python语言学习之打印输出那些事:python输出图表和各种吊炸天的字符串或图画、版权声明(如README.md)等之详细攻略
- Python之多线程:python多线程设计之同时执行多个函数命令详细攻略
- Python编程语言学习:包导入和模块搜索路径(包路径)简介、使用方法(python系统环境路径的查询与添加)之详细攻略
- Python之多线程:python多线程设计之同时执行多个函数命令详细攻略
- Python之API:基于python语言调用华为云API(华为网站)实现特定功能
- 已解决2. Set PROTOCOL_BUPFERS_PYTHON_iMPLEMENTATION=python (but this will use pure-Python parsing and w
- 〖Python APP 自动化测试实战篇⑨〗- 实战 - App自动化实战操作
- python代替js写前端脚本之计算器demo(browser.html)
- 数学建模学习(106):三种相关性检验,Python实践
- python魔法函数__dict__和__getattr__的妙用
- Python编程:排序算法之堆排序
- python 定义带默认参数的函数
- 60集Python入门视频PPT整理 | Python编程基础及编程风格
- python随机采样函数np.random.choice
- python实战===2017年30个惊艳的Python开源项目 (转)
- python redis 消息队列