2012-06-08 55 views
0

我正在使用unix的c shell。我在python中創建了一個腳本,文件擴展名爲.py
現在我想將這個.py文件轉換爲unix c shell中的.exe文件。
我發現py2exe包不適用於csh,但有freeze.py,我可以用它來轉換Google說的。
但我無法在我的情況下使用它。當我使用python freeze.py hello.py時,會產生一個錯誤:freeze.py not found 在UNIX中有沒有其他的辦法呢?使用unix將.py文件轉換爲.exe

+0

請問我知道降壓的原因... – Ovisek

+1

你看起來凍結了嗎?你真的安裝它嗎? downvote可能來自某人以爲你在問之前沒有做過功課。對我來說,聽起來你就是迷失了。再環視一下然後回來。 –

+0

所以你想在unix系統上創建一個Windows可執行文件? – martineau

回答

2

簡單的答案是「否」。雖然有一個選項:使用WINE和PyInstaller

PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, Solaris and AIX. Its main advantages over similar tools are that PyInstaller works with any version of Python since 2.2, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility.

+0

本頁面:http://wiki.python.org/moin/Py2Exe明確指出Py2exe不適用於Wine(它會產生錯誤的可執行文件)。它還討論了其他可能性,例如PyInstaller和freeze。 – teukkam

+0

我的意思是PyInstaller和WINE。這是在其常見問題解答中提出的。 –

相關問題