Python 将.py文件打包成.exe 文件
第一步:我们需要安装Pyinstaller模块
windows运行cmd,输入以下命令:
pip install Pyinstaller

然后定位到需要打包的文件,例如:cd C:\项目
然后输入:Pyinstaller -F -w

然后等待打包完成即可。
解析成功截图:


打包带icon图标:
pyinstaller -F -w -i *.ico *.py
🏆 每日挑战:你知道答案吗?
在 PowerShell 中,如何使用 `Invoke-WebRequest` 获取网页内容?
温馨提示 : 非特殊注明,否则均为©李联华的博客网原创文章,本站文章未经授权禁止任何形式转载;IP地址:18.117.7.5,归属地:俄亥俄州Dublin ,欢迎您的访问!
文章链接:https://www.lilianhua.com/python-packages-py-files-as-exe-files.html
文章链接:https://www.lilianhua.com/python-packages-py-files-as-exe-files.html