关于python如何生成exe文件
作者:Kerven_hkw 时间:2021-06-05 00:52:33
python 生成 exe 文件的方法:首先安装 pyinstaller,代码为【pip install pyinstaller】;然后使用 pyinstaller 命令打包成 exe【pyinstaller -F --icon=my.ico…】。
python 生成 exe 文件的方法:
一、安装 pyinstaller
pip install pyinstaller
二、使用 pyinstaller 命令
pyinstaller -F main.py #打包成 exe
pyinstaller -F --icon=my.ico test.py #打包成 exe,并设置图标
pyinstaller -F -w yourfilename.py #打包成 exe, 且不包含控制台
其他参数:
一般 python GUI 编程才用到 打包成 exe,讲道理不如. net 的 winform 好使
来源:https://blog.csdn.net/qq_34035956/article/details/127270127
标签:python,exe,文件
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python实现监控内存使用情况和代码执行时间
2023-05-02 15:42:02
![](https://img.aspxhome.com/file/2023/8/90948_0s.jpg)
一个不错的网页拾色器
2007-09-30 19:45:00
![](https://img.aspxhome.com/file/UploadPic/20079/30/2007930201019921s.jpg)
使用Python制作表情包实现换脸功能
2022-01-14 09:10:18
![](https://img.aspxhome.com/file/2023/4/81794_0s.webp)
anaconda3安装及jupyter环境配置全教程
2021-03-26 07:45:07
![](https://img.aspxhome.com/file/2023/3/82923_0s.png)
你们要的Python绘画3D太阳系详细代码
2021-05-12 09:32:48
![](https://img.aspxhome.com/file/2023/1/86371_0s.gif)
Python爬虫信息输入及页面的切换方法
2023-08-02 17:33:33
Python使用pylab库实现画线功能的方法详解
2021-02-03 18:26:07
![](https://img.aspxhome.com/file/2023/9/117909_0s.png)
python爬虫实例详解
2021-07-05 01:37:53
![](https://img.aspxhome.com/file/2023/8/81598_0s.png)
使用Python实现企业微信通知功能案例分析
2022-12-26 05:03:48
![](https://img.aspxhome.com/file/2023/3/71313_0s.png)
Python OpenCV学习之图像形态学
2022-01-16 21:48:29
![](https://img.aspxhome.com/file/2023/6/93746_0s.jpg)
基于Python手写拼音识别
2022-10-22 09:24:09
![](https://img.aspxhome.com/file/2023/4/69574_0s.png)
python实战之90行代码写个猜数字游戏
2023-05-24 21:14:49
Python Socket多线程并发原理及实现
2022-09-05 08:21:07
![](https://img.aspxhome.com/file/2023/5/77765_0s.png)
ORACLE常见错误代码的分析与解决(一)
2010-08-02 13:20:00
Python浮点型(float)运算结果不正确的解决方案
2023-10-04 16:57:44
![](https://img.aspxhome.com/file/2023/7/63547_0s.png)
使用python将图片按标签分入不同文件夹的方法
2021-04-14 05:34:54
![](https://img.aspxhome.com/file/2023/6/118716_0s.jpg)
Python3简单实例计算同花的概率代码
2023-07-20 16:23:03
![](https://img.aspxhome.com/file/2023/6/70746_0s.png)
详解pandas DataFrame的查询方法(loc,iloc,at,iat,ix的用法和区别)
2022-01-24 04:44:33
![](https://img.aspxhome.com/file/2023/0/99270_0s.png)
PyTorch中topk函数的用法详解
2022-11-08 13:55:52
![](https://img.aspxhome.com/file/2023/3/86183_0s.jpg)
Python numpy和matlab的几点差异介绍
2023-12-14 23:26:39