关于pyinstaller转换使用问题

f08865 2015-05-04 06:21:07
最近在研究将py文件转化为exe文件,先使用了py2exe,然后失败,http://bbs.csdn.net/topics/391027909
然后转战pyinstaller
安装设置什么的略过,但是应该是没问题的,因为我先尝试了打包一个hello.py
用-D和-F两种形式,均没问题
然后就开始打包我所需要的文件,
我将它们都放在同一目录,方便打包
然后使用python pyinstaller.py -F lightcompute.py 命令
忘了说,我的原文件里面是import了另外3个文件外加matplotlib、numpy、pyqt等库


然后出现了一下问题
c:\Python27\pyinstaller>python pyinstaller.py -F lightcompute.py
36 INFO: wrote c:\Python27\pyinstaller\lightcompute\lightcompute.spec
59 INFO: Testing for ability to set icons, version resources...
62 INFO: ... resource update available
67 INFO: UPX is not available.
1146 INFO: checking Analysis
1146 INFO: building Analysis because out00-Analysis.toc non existent
1147 INFO: running Analysis out00-Analysis.toc
1148 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable

1282 INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.
21022.8_none ...
1282 WARNING: Assembly not found
1285 ERROR: Assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
not found
1411 INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.
21022.8_none ...
1413 INFO: Found manifest C:\Windows\system32\Microsoft.VC90.CRT.manifest
1414 INFO: Searching for file msvcr90.dll
1416 INFO: Found file C:\Windows\system32\msvcr90.dll
1416 INFO: Searching for file msvcp90.dll
1419 INFO: Found file C:\Windows\system32\msvcp90.dll
1420 INFO: Searching for file msvcm90.dll
1421 WARNING: No such file C:\Windows\system32\msvcm90.dll
1424 WARNING: Assembly incomplete
1424 ERROR: Assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
not found
1503 INFO: Analyzing c:\Python27\pyinstaller\support\_pyi_bootstrap.py
2641 INFO: Analyzing c:\Python27\pyinstaller\PyInstaller\loader\archive.py
2775 INFO: Analyzing c:\Python27\pyinstaller\PyInstaller\loader\carchive.py
2933 INFO: Analyzing c:\Python27\pyinstaller\PyInstaller\loader\iu.py
2970 INFO: Analyzing lightcompute.py
5720 INFO: checking Tree
5924 INFO: checking Tree
7745 WARNING: pythoncom is changing its name to pythoncom27
7805 WARNING: pywintypes is changing its name to pywintypes27
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_webagg.py", li
ne 30, in <module>
raise RuntimeError("The WebAgg backend requires Tornado.")
RuntimeError: The WebAgg backend requires Tornado.
Traceback (most recent call last):
File "pyinstaller.py", line 91, in <module>
main()
File "pyinstaller.py", line 86, in main
run_build(opts, spec_file)
File "pyinstaller.py", line 50, in run_build
PyInstaller.build.main(spec_file, **opts.__dict__)
File "c:\Python27\pyinstaller\PyInstaller\build.py", line 1625, in main
build(specfile, buildpath)
File "c:\Python27\pyinstaller\PyInstaller\build.py", line 1582, in build
execfile(spec)
File "c:\Python27\pyinstaller\lightcompute\lightcompute.spec", line 5, in <mod
ule>
hookspath=None)
File "c:\Python27\pyinstaller\PyInstaller\build.py", line 389, in __init__
self.__postinit__()
File "c:\Python27\pyinstaller\PyInstaller\build.py", line 315, in __postinit__

self.assemble()
File "c:\Python27\pyinstaller\PyInstaller\build.py", line 475, in assemble
importTracker.analyze_script(script)
File "c:\Python27\pyinstaller\PyInstaller\depend\imptracker.py", line 205, in
analyze_script
return self.analyze_r('__main__')
File "c:\Python27\pyinstaller\PyInstaller\depend\imptracker.py", line 98, in a
nalyze_r
newnms = self.analyze_one(name, nm, imptyp, level)
File "c:\Python27\pyinstaller\PyInstaller\depend\imptracker.py", line 159, in
analyze_one
mod = self.doimport(nm, ctx, fqname)
File "c:\Python27\pyinstaller\PyInstaller\depend\imptracker.py", line 256, in
doimport
hooks = __import__('PyInstaller.hooks', globals(), locals(), [hookmodnm])
TypeError: Item in ``from list'' not a string

啊!!!求助
...全文
1843 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
chunqiuyiyu 2016-04-16
  • 打赏
  • 举报
回复
应该是你在 windows 平台下的依赖没安好吧? PyWin32 安装没有?注意版本号以及 32/64 位的对应
p_h_king 2016-03-27
  • 打赏
  • 举报
回复
我也遇到这个问题,请问楼主解决了么?
sinat_15579781 2015-08-12
  • 打赏
  • 举报
回复
我也遇到楼主同样的问题,求问怎么解决的?
deadxing 2015-08-08
  • 打赏
  • 举报
回复
Assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none not found 我也遇到了左右的问题,搜索不到解决方法,请问楼主怎么解决的?

37,721

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧