深圳全飞鸿

标题: python程序打包及发布方法实践 [打印本页]

作者: zhgc    时间: 2019-7-9 19:15
标题: python程序打包及发布方法实践
本帖最后由 zhgc 于 2019-7-9 19:27 编辑

>pip install pyinstaller安装失败,改为pip3安装成功

>pip3 install pyinstaller

Installing collected packages: future, pefile, altgraph, macholib, pywin32-ctype
s, pyinstaller
  Running setup.py install for future ... done
  Running setup.py install for pefile ... done
  The scripts macho_dump.exe, macho_find.exe and macho_standalone.exe are instal
led in 'c:\users\administrator\appdata\local\programs\python\python37-32\Scripts
' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warn
ing, use --no-warn-script-location.

  Running setup.py install for pyinstaller ... done
Successfully installed altgraph-0.16.1 future-0.17.1 macholib-1.11 pefile-2019.4
.18 pyinstaller-3.4 pywin32-ctypes-0.2.0


输入命令 pyinstaller -F 文件名

C:\>pyinstaller -F itchat_qfh.py

编译后成生exe的同名文件:




可以正常执行:



作者: zhgc    时间: 2019-12-2 00:10
C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts
作者: zhgc    时间: 2020-3-17 23:56
又一次装pyinstaller时失败,用这个方法可以成功安装,而且速度快:

  1. pip install pyinstaller -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
复制代码





欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2