深圳全飞鸿

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 746|回复: 2
打印 上一主题 下一主题

python程序打包及发布方法实践

[复制链接]

800

主题

1379

帖子

7704

积分

版主

Rank: 7Rank: 7Rank: 7

积分
7704
跳转到指定楼层
楼主
发表于 2019-7-9 19:15:30 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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的同名文件:




可以正常执行:


回复

使用道具 举报

800

主题

1379

帖子

7704

积分

版主

Rank: 7Rank: 7Rank: 7

积分
7704
沙发
 楼主| 发表于 2019-12-2 00:10:33 | 只看该作者
C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts
回复 支持 反对

使用道具 举报

800

主题

1379

帖子

7704

积分

版主

Rank: 7Rank: 7Rank: 7

积分
7704
板凳
 楼主| 发表于 2020-3-17 23:56:14 | 只看该作者
又一次装pyinstaller时失败,用这个方法可以成功安装,而且速度快:

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

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|nagomes  

GMT+8, 2025-5-5 02:02 , Processed in 0.026742 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表