pyinstaller 下载地址:http://www.pyinstaller.org/

下载后用cmd进入解压文件夹 python setup.py install 安装。

最近用pyinstaller打包小程序,遇到一些问题。

1.用最新版本的pyinstaller3.2打包时,出现错误:ImportError: No module named ‘pefile’。

解决方法:安装了pyinstaller3.0

2.打包时闪退

问题:程序有错误,将打包好的exe文件拖至cmd里面运行,就可以看到报错提示,改正。

如果程序没有错误,则在末尾加入 raw_input()

pyinstaller 使用方法:

1.将要打包的程序以及.ico后缀的图标放到同一个文件夹中。

2.cmd进入安装pyinstaller的文件夹中,运行语句:

[pyinstaller.py -F -i F:\program\temp\example.ico F:\program\temp\example.py]

则在安装pyinstaller的文件夹中,有一个example命名的文件夹,dist子文件夹里就存在打包好的程序。

其中参数含义如下:

-F 指定打包后只生成一个exe格式的文件

-c     –console, –nowindowed 使用控制台,无界面(默认)

-w     –windowed, –noconsole 使用窗口,无控制台

-p     添加搜索路径,让其找到对应的库。

-i     改变生成程序的icon图标

PyInstaller打包步骤简记的更多相关文章

  1. pyinstaller打包自己的python程序

    使用Pyinstaller打包步骤如下 1. 安装pyinstaller pip install pyinstaller 查看安装的版本 pyinstaller --version 2. 给脚本加密 ...

  2. 20.用PyInstaller打包py程序的步骤及问题解决

    最近写了一个移动和复制文件的代码,代码完成之后,想将其打包成一个可以在任何电脑上使用的软件, 于是在网上查找相关资料,可以用PyInstaller打包成.exe程序,以下是具体步骤: 1.安装PyIn ...

  3. 【Python】 如何用pyinstaller打包python程序成exe

    [pyinstaller] pyinstaller在他们的官方网站上下载:http://www.pyinstaller.org/ 下载完pyinstaller之后还要安装一个支持包pywin32. 这 ...

  4. Pyinstaller打包附带DLL、图标和压缩EXE方法

    Pyinstaller打包附带DLL.图标和压缩EXE方法     转载: https://blog.csdn.net/xinyingzai/article/details/80282856   目的 ...

  5. python3 使用pyinstaller打包可执行程序

    步骤 1.使用pip安装pyinstaller pip install pyinstaller 2. 使用pyinstaller打包程序 pyinstaller -F xxx.py pyinstall ...

  6. pyinstaller打包python文件成exe(原理.安装.问题)

    py文件打包成exe文件的方式一共有三种:py2exe.PyInstaller和cx_Freeze 本文分四个步骤来详讲如何用PyInstaller将py文件打包成exe文件 1. PyInstall ...

  7. 【Python开发】PyInstaller打包Python程序

    PyInstaller是一个能将Python程序转换成单个可执行文件的程序, 操作系统支持Windows, Linux, Mac OS X, Solaris和AIX.并且很多包都支持开箱即用,不依赖环 ...

  8. 反编译pyinstaller打包的exe安装包

    PyInstaller将Python文件打包为exe后如何反编译(破解源码)以及防止反编译 在这里分享一些技巧和经验给大家.辛苦撰文分享,转载或引用请保留本文作者信息及文章链接. 作者的环境: win ...

  9. pyinstaller打包pyqt5,从入坑到填坑,详解

    以上省略pyinstaller安装步骤,直入主题.先分享我的心路历程. 1.pyinstaller -F -i 1.ico UI_Main.py (先在CMD中 cd到 py文件对应的路径) 第一步打 ...

随机推荐

  1. stack.sh failing giving error "g-api did not start"

    same issue i faced , tried with ./unstack.sh and ./clean.sh also but couldn't fix the issue.Followin ...

  2. 学习OpenStack之(6):Neutron 深入学习之 OVS + GRE 之 Compute node 篇

    0.环境 硬件环境见上一篇博客:学习OpenStack之(5):在Mac上部署Juno版本OpenStack 四节点环境 OpenStack网络配置:一个tenant, 2个虚机 Type drive ...

  3. [转]在MyEclipse中设置struts.xml自动提示功能

    导入标签:<%@ taglib uri="/struts-tags" prefix="s" %> 要想在MyEclipse中实现struts.xml ...

  4. LeetCode 118 Pascal's Triangle

    Problem: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows  ...

  5. Linux-iptables初识

    Linux-iptables初识 了解 iptables是与Linux内核集成的IP信息包过滤系统.如果Linux系统连接到因特网或LAN.服务器或连接LAN和因特网的代理服务器,则该系统有利于在Li ...

  6. Oracle insert大量数据经验之谈(转)

    在很多时候,我们会需要对一个表进行插入大量的数据,并且希望在尽可能短的时间内完成该工作,这里,和大家分享下我平时在做大量数据insert的一些经验. 前提:在做insert数据之前,如果是非生产环境, ...

  7. 9.JAVA中的正则表达式

    一.JAVA中的正则表达式 1.概念:以某种特定的方式描述字符串 1.Java中正则表达式的规则 ?          #{0,1}-?有一个-或者没有 \\           #表示一个" ...

  8. PAT A 1119. Pre- and Post-order Traversals (30)【二叉树遍历】

    No.1119 题目:由前序后序二叉树序列,推中序,判断是否唯一后输出一组中序序列 思路:前序从前向后找,后序从后向前找,观察正反样例可知,前后序树不唯一在于单一子树是否为左右子树. 判断特征:通过查 ...

  9. 12 自定义标签/JSTL标签库/web国际化/java web之设计模式和案例

    EL应用      自定义一个标签,实现两个字符串的相加 1回顾      1.1servlet生命周期           init(ServletConfig)           service ...

  10. 判断IP地址是否合法类

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace IPFl ...