py2exe打包包含wmi模块的脚本后,运行时出现win32api.pyd错误的解决办法。
2012-03-22 10:03
513 查看
前些天写了一个小脚本,需要用到wmi模块。但是用py2exe打包运行后老是出现如下错误提示:
“ImportError: MemoryLoadLibrary failed loading win32api.pyd”
后来GOOGLE了半天,终于在一个E文网站查询到了解决办法。正确的解决方法是:
修改Py2exe的打包配置文件setup.py,在options参数中添加一个键:
'dll_excludes': [ "mswsock.dll", "powrprof.dll" ]
至于产生这个问题的具体原因嘛,网上查到的资料都写的模棱两可,我自己也不敢肯定,也就在这里不让大家更迷糊了。
“ImportError: MemoryLoadLibrary failed loading win32api.pyd”
后来GOOGLE了半天,终于在一个E文网站查询到了解决办法。正确的解决方法是:
修改Py2exe的打包配置文件setup.py,在options参数中添加一个键:
'dll_excludes': [ "mswsock.dll", "powrprof.dll" ]
至于产生这个问题的具体原因嘛,网上查到的资料都写的模棱两可,我自己也不敢肯定,也就在这里不让大家更迷糊了。
相关文章推荐
- 用py2exe打包运行后出现requests.exceptions.SSLError: [Errno 2]解决办法
- pyinstaller打包生成软件运行时出现缺少模块cython_blas的错误(总结就是缺少依赖文件pyd,注意命名规则)
- 打开Office时出现“运行时错误91”问题的解决办法
- 运行Double DQN程序出现错误及解决办法
- 用vc2013编写的程序在新电脑上运行出现“0xc000007b”错误的解决办法
- c# 打包出现HRESULT = '80040155' 错误 解决办法
- Android项目运行junit测试类时出现错误Internal Error (classFileParser.cpp:3494)的解决办法
- Android项目运行junit测试类时出现错误Internal Error (classFileParser.cpp:3494)的解决办法
- 运行PHP出现No input file specified错误的解决办法
- 关于delphi软件运行出现Invalid floating point operation的错误的解决办法
- Microsoft Office 2013 破解出现输入错误,找不到脚本文件 解决办法
- WCF运行错误:“此集合已经包含方案 http 的地址”的解决办法
- set Factory打包出现错误解决办法。
- Jenkins 打包出现You have not accepted the license agreements of the following SDK components: 错误的解决办法
- 解决办法:asp.net发布到IIS中出现错误:处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”(转)
- Ubuntu下gradle运行卡住,出现Exception in thread "png-cruncher_2"错误的解决办法
- 运行PHP出现No input file specified错误的解决办法
- springboot项目打包后运行出现问题解决办法
- 运行ant脚本进行打包无法创建路径(and the archive is probably corrupt but I could not delete it)解决办法
- 安装python模块时出现错误:UnicodeDecodeError: 'utf-8' codec ...的解决办法