簡體   English   中英

打包可以在未安裝Python的計算機上運行的Python腳本?

[英]Packaging a Python script that can be run on a computer that doesn't have Python installed?

我有一個Python腳本(用於處理共享驅動器上的文件)。 我想將該腳本轉換為文件(也許是.exe?),可以雙擊該文件並在未安裝Python的計算機上運行。 這可能/容易做到嗎?

您可以嘗試py2exe

可以在http://www.py2exe.org/index.cgi/Tutorial中找到教程

我使用並推薦pyinstaller。 如果只需要一個可執行文件 ,則需要安裝pyinstaller並通過以下參數調用可執行文件:

pyinstaller.exe your_script.py --onefile --windowed

生成可執行文件時,可以使用以下選項: https : //pythonhosted.org/PyInstaller/usage.html#options

要安裝: http : //www.pyinstaller.org/

文檔: https : //pythonhosted.org/PyInstaller/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM