pyinstall 把你的程式變成windows的可執行程式。py exe

來源:互聯網
上載者:User

標籤:installer   director   window   div   需要   file   虛擬環境   ctf   讀取   

我們先看一下這個官方文檔

http://pythonhosted.org/PyInstaller/

其實常用的也就是兩句

pyinstall ***.py

pyinstall -F ***.py

一:模組的安裝

本來是想把pyinstall裝在python基礎環境中。但是發現這個打包的時候,需要讀取python環境中的包,所以還是裝在每個項目的虛擬環境中吧。

http://www.cnblogs.com/jackadam/p/8067327.html

參考這篇文章,直接裝pyinstaller  記得是帶er的那個。

二:配置擴充工具

如所示

$PyInterpreterDirectory$\pyinstaller.exe  這個是指這個虛擬環境下的pytinstall

$FilePath$ 這個是指檔案的完整路徑

$ProjectFileDir$ 這個是專案檔夾。

全部合起來就是在專案檔夾下運行pyinstall 把完整路徑的檔案,產生EXE,windows可執行檔。

下面這個是帶-F 參數,產生單一檔案。

Group是擴充工具分組,我還有pyqt的兩個擴充,所以要用分組。

三:使用pyinstall

開啟你的項目,配置好虛擬環境,在虛擬環境中安裝pyinstaller

都完成以後,就可以在檔案上點右鍵了,Group下面,會有pyinstall項。

 

pyinstall 把你的程式變成windows的可執行程式。py exe

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.