国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

將python文件打包exe獨立運行程序方法詳解

2020-02-15 21:13:48
字體:
來源:轉載
供稿:網友

首先需要安裝pyinstaller庫。

pip install pyinstaller

exe程序打包步驟

cmd 進入要編譯的python文件所在的文件夾,

然后

pyinstaller -F hello.py

hello.py就是我要打包的文件。

常用參數:

-F 生成單個的exe文件。

-w 隱藏運行窗口。

-h 可以查看幫助信息,更多指令可以通過這個查看。

最開始 D:/pyinstaller 目錄下只有hello.py這一個文件,其它的文件都是后生成的。

生成的exe文件在dist里,這個exe文件單獨拿出來放在任何的位置都可以運行。

編譯過程:

出現completed successfully就成功了。

96 INFO: PyInstaller: 3.496 INFO: Python: 3.6.897 INFO: Platform: Windows-7-6.1.7601-SP198 INFO: wrote D:/pyinstaller/hello.spec105 INFO: UPX is not available.107 INFO: Extending PYTHONPATH with paths['D://pyinstaller', 'D://pyinstaller']107 INFO: checking Analysis108 INFO: Building Analysis because Analysis-00.toc is non existent108 INFO: Initializing module dependency graph...110 INFO: Initializing module graph hooks...112 INFO: Analyzing base_library.zip ...4577 INFO: running Analysis Analysis-00.toc4582 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by d:/python3.6.8/python.exe5582 INFO: Caching module hooks...5590 INFO: Analyzing D:/pyinstaller/hello.py5596 INFO: Loading module hooks...5597 INFO: Loading module hook "hook-encodings.py"...5845 INFO: Loading module hook "hook-pydoc.py"...5847 INFO: Loading module hook "hook-xml.py"...6152 INFO: Looking for ctypes DLLs6152 INFO: Analyzing run-time hooks ...6164 INFO: Looking for dynamic libraries6287 INFO: Looking for eggs6287 INFO: Using Python library d:/python3.6.8/python36.dll6288 INFO: Found binding redirects:[]6294 INFO: Warnings written to D:/pyinstaller/build/hello/warn-hello.txt6349 INFO: Graph cross-reference written to D:/pyinstaller/build/hello/xref-hello.html6357 INFO: checking PYZ6358 INFO: Building PYZ because PYZ-00.toc is non existent6359 INFO: Building PYZ (ZlibArchive) D:/pyinstaller/build/hello/PYZ-00.pyz7000 INFO: Building PYZ (ZlibArchive) D:/pyinstaller/build/hello/PYZ-00.pyz completed successfully.7006 INFO: checking PKG7007 INFO: Building PKG because PKG-00.toc is non existent7007 INFO: Building PKG (CArchive) PKG-00.pkg8818 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.8822 INFO: Bootloader d:/python3.6.8/lib/site-packages/PyInstaller/bootloader/Windows-32bit/run.exe8822 INFO: checking EXE8823 INFO: Building EXE because EXE-00.toc is non existent8824 INFO: Building EXE from EXE-00.toc8826 INFO: Appending archive to EXE D:/pyinstaller/dist/hello.exe            
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 岳西县| 甘孜县| 庐江县| 墨竹工卡县| 临沂市| 陵川县| 论坛| 长岭县| 内江市| 阿坝| 沙河市| 永和县| 光泽县| 唐河县| 饶平县| 乳山市| 来凤县| 栾川县| 岳阳县| 云和县| 航空| 芮城县| 蓝田县| 靖州| 四平市| 朝阳区| 天台县| 嘉定区| 宣恩县| 洛阳市| 景谷| 昌宁县| 河池市| 衡阳县| 绍兴县| 和顺县| 庆元县| 虎林市| 莱西市| 柳州市| 汤阴县|