如何从 python 3.5 脚本创建独立的可执行文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33168229/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 12:55:20 来源:igfitidea点击:
How to create standalone executable file from python 3.5 scripts?
提问by Abhinav
Most of the programs available only support upto python version 3.4.
大多数可用的程序仅支持 Python 3.4 版。
回答by cosmoscalibur
You can use PyInstallerwhich support python 3.5.
您可以使用支持 python 3.5 的PyInstaller。
To install it with pip execute in terminal:
pip install pyinstaller
要在终端中使用 pip execute 安装它:
pip install pyinstaller
To make the .exe file:
要制作 .exe 文件:
pyinstaller --onefile script.py