[英]How to packaging and run python script including venvs on another computer
[英]Packaging a Python script that can be run on a computer that doesn't have Python installed?
我有一个Python脚本(用于处理共享驱动器上的文件)。 我想将该脚本转换为文件(也许是.exe?),可以双击该文件并在未安装Python的计算机上运行。 这可能/容易做到吗?
您可以尝试py2exe
。
我使用并推荐pyinstaller。 如果只需要一个可执行文件 ,则需要安装pyinstaller并通过以下参数调用可执行文件:
pyinstaller.exe your_script.py --onefile --windowed
生成可执行文件时,可以使用以下选项: https : //pythonhosted.org/PyInstaller/usage.html#options
要安装: http : //www.pyinstaller.org/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.