使用pyinstaller打包.py程序

使用pyinstaller打包.py程序

例如打包D:/Desktop 目录下的 filename.py 文件

  • 打开 cmd 将目录切换至 D:/Desktop
  • 输入命令 pyinstaller -F filename.py 即可在dist目录中找到 filename.exe

    除exe文件外的所有生成文件都可以删除

另外 -F为 产生单个的可执行文件,也可以使用-D,其为产生一个目录(包含多个文件)作为可执行程序。

原文地址:https://www.cnblogs.com/woxiaosade/p/11297853.html

时间: 2024-08-30 14:42:26

使用pyinstaller打包.py程序的相关文章

使用PyInstaller打包Python程序

使用PyInstaller打包Python程序 PyInstaller介绍: PyInstaller是一个能将Python程序转换成单个可执行文件的程序, 操作系统支持Windows, Linux, Mac OS X, Solaris和AIX.并且很多包都支持开箱即用,不依赖环境. 环境为windows7操作系统,python2.7.8 virtual environment 官网:https://github.com/pyinstaller/pyinstaller 详细步骤: 1. win7下

pyinstaller打包python程序(python3.5)

昨天弄好程序以后,思量这真正做活动也不可能现场打开IDE来运行吧,然后寻思着在网上查找如何打包 搜寻网上的方法,大概也就两种 Py2exe pyinstaller 第一种看大多数的评价貌似不高,而且好像很麻烦的样子 所以我就选择了第二种 安装过程: 以前介绍过两种方式 http://www.cnblogs.com/ronyjay/p/6483522.html pip 第三方安装 首先我选择尝试了第三方安装: 网上下载pyinstaller的包,地址https://github.com/pyins

pyinstaller 打包python程序

准备: Python 3.7  PC 运行 Python 环境 安装 pytistaller 命令: 语法: pyinstaller [options] script [script ..] | specfile pyinstaller hello.py 常用参数: -n 文件名 -D 创建一个可执行文件的单文件包 -F           创建一个绑定的可执行文件 -w   使用窗口 无控制台 可以通过 pyinstaller -h 或者 pyinstaller --hrlp 查看全部参数!!

pyinstaller打包exe程序各种坑!!!

pyinstaller打包python成exe可执行程序,各种报错,各种坑,在次记录下 一.pyinstaller打包报错for real_module_name, six_moduleAttributeError: 'str' object has no attribute 'items' 升级版本 pip install -U --pre setuptools 或者:直接下载最新版 https://pypi.org/project/setuptools/ 二.LookupError: No

python3.6 使用pyinstaller 打包web程序的方法

官方文档连接 (https://pyinstaller.readthedocs.io/en/stable/ ) 第一步,下载pywin32 首先下载pywin32,下面是下载链接,下载自己的系统版本对应的pywin32 https://github.com/mhammond/pywin32/releases 第二步,安装pyinstaller pip install pyinstaller 第三步,打包程序 命令参数 参数 描述 -F 表示生成单个可执行文件 -w 表示去掉控制台窗口,这在GUI

python 使用pyinstaller打包程序

使用pyinstaller 打包.py脚本,在其他计算机可以直接运行,不需要python环境 安装pyinstaller库 pip install pystaller 打包程序 pyinstaller -F *.py 会生成三个文件,程序在dist文件里,其他两个文件夹可以删除 打包程序并使用指点图标 命令 pyinstaller -i <图标文件名.ico> -F *.py 原文地址:https://www.cnblogs.com/sineik/p/9226195.html

使用pyinstaller 对py脚本进行打包(生成linux可执行文件)

需求1:打包成Linux上可执行程序 a. 先下载pyinstaller程序,我当前下载的是PyInstaller-2.1的版本 进行如下操作: [email protected]:~/PyInstaller-2.1$ sudo python2.7 setup.py install [email protected]:~/PyInstaller-2.1$ pwd /home/pythoner/PyInstaller-2.1 #生成一个单文件可执行的spec文件 [email protected]

如何使用 pyinstaller 对py脚本进行打包?

需求1:打包成Linux上可执行程序a. 先下载pyinstaller程序,我当前下载的是PyInstaller-2.1的版本 进行如下操作: [email protected]:~/PyInstaller-2.1$ sudo python2.7 setup.py install [email protected]:~/PyInstaller-2.1$ pwd /home/pythoner/PyInstaller-2.1 生成一个单文件可执行的spec文件 [email protected]:~

Windows用Pyinstaller把Python3程序打包成可执行文件exe

pip pip 是一个安装Python包的工具, 一般是在Python安装目录下的Scripts文件夹里.如果电脑上有pip,打开CMD窗口,进入pip所在目录,或者把这个目录添加到环境变量,输入 pip list 就可以看到已经安装的Python包 如果电脑上没有,可以到网上下载一个,链接https://pypi.python.org/pypi/pip 下载完成之后,解压到一个文件夹,用CMD控制台进入解压目录,输入: python setup.py install 等待完成安装即可 Pyin