欢迎来到天天文库
浏览记录
ID:8810515
大小:22.00 KB
页数:5页
时间:2018-04-08
《pyinstaller将python打包为exe文件》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、Pyinstaller将python打包为EXE文件 将python脚本打包为EXE文件有不少选择方案,本方案使用pyinstaller。 第一步: 当然是到python的官网下载python并安装。 编写好python脚本并且运行正常。 第二步: 到http://www.pyinstaller.org/下载最新版本的pyinstaller。本文写作时是pyinstaller2.0, 支持python2.3~2.7版本。下载后解压到某个文件夹,如:c:pyinstaller。 第三步: pyinstaller依赖一些windows的组件,需要
2、到http://sourceforge.net/projects/pywin32/ 下载相应python的版本,例如:python2.7的32位版:pywin32-218.win32-py2.7.exe 第四步: 进入pyinstaller目录,试运行看看是否安装正确。 以下是运行屏幕: C:>cdc:pyinstaller C:pyinstaller>c:python27pythonpyinstaller.py Error:PyInstallerforPython2.6+onWindowsneedspywin32. Pleaseinst
3、allfromhttp://sourceforge.net/projects/pywin32/ #上面的错误提示安装pywin32-218.win32-py2.7.exe。 C:pyinstaller>c:python27pythonpyinstaller.py Usage:pythonpyinstaller.py[opts][...]
4、 pyinstaller.py:error:Requiresatleastonescriptnamefileorexactlyone.sp
5、ec-file #以上信息表示可以开展工作了。 #以下是测试一个python-tools.py文件的打包,文件放在当前目录的mytools文件夹里面 C:pyinstaller>c:python27pythonpyinstaller.py--console--onefilemytoolspython-tools.py 67INFO:wroteC:pyinstallerpython-toolspython-tools.spec 175INFO:Testingforabilitytoseticons,versionresources...
6、 224INFO:...resourceupdateavailable 234INFO:UPXisnotavailable. 3179INFO:checkingAnalysis 3179INFO:buildingAnalysisbecauseout00-Analysis.tocnonexistent 3179INFO:runningAnalysisout00-Analysis.toc 3189INFO:AddingMicrosoft.VC90.CRTtodependentassembliesoffinalexecutable 3218INFO:Sea
7、rchingforassemblyx86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww... 3218INFO:FoundmanifestC:WINDOWSWinSxSManifestsx86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375.manifest 3228INFO:Searchingforfilemsvcr90.dll 3228INFO:FoundfileC:WINDOWSWinSxSx86_
8、Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375msvcr90.dll 3228INFO:Searchingforfilemsvcp90.dll 3228INFO:FoundfileC:WINDOWSWinSxSx86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375msvcp90.dll 3238INFO:Searchingforfilemsvcm90.dll 3238INFO:Foundfil
9、eC:WINDOWSWinSxSx86_Microsoft.VC90.CRT_1fc8b
此文档下载收益归作者所有