一、python的.py文件生成.exe文件
pyinstaller-4.0.tar.gz下载: 链接:https://pan.baidu.com/s/1YozCMet3KV1PwiKVb1OakA 提取码:5nd0
1.下载pyinstaller
不同的python版本可能需要下载不同的pyinstaller版本。
2.安装pyinstaller
复制一个python.exe到之前解压的pyinstaller目录下,然后打开CMD命令(按shift+鼠标右键在此处打开命令窗口)执行:python setup.py install。
三、.py文件生成.exe文件
随便找一个py文件测试一下就好!
pyinstaller -F -i 1.ico 2.py
执行代码:python pyinstaller.py -F 文件名.py
生成新的文件夹:
结果成功:
在生成文件夹里的dist里面!
四、生成没有黑窗口的exe文件
python pyinstaller.py -F -w 有道翻译.py
二、C#桌面的exe文件
直接找到自己的项目文件: