pyinstaller使用-python項目轉換成exe可執行文件


Python版本:Python3.5.2

一、安裝Pyinstaller

1、安裝pyinstaller

使用pip命令安裝:pip install pyinstaller

pip install pyinstaller

 

安裝報錯的話就是其他依賴環境沒裝

pip3 install Twisted-18.7.0-cp35-cp35m-win32.whl
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple selenium
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple scrapy
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller

  

二、使用Pyinstaller

1、使用下載安裝的方式安裝的Pyinstaller打包方式

pyinstaller -F odoo.py

  

2、輸入參數的含義

  • -F 表示生成單個可執行文件

  • -w 表示去掉控制台窗口,這在GUI界面時非常有用。不過如果是命令行程序的話那就把這個選項刪除吧!

  • -p 表示你自己自定義需要加載的類路徑,一般情況下用不到

  • -i 表示可執行文件的圖標

 

其他參考:https://www.cnblogs.com/gopythoner/p/6337543.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM