该应用程序在我的开发win8环境中运行良好,但是当它与py2exe打包并在生产机器上运行时,它抛出异常:
“无法在动态链接库 ntdll.dll 中定位过程入口点 RtlIdnToAscii”
日志文件的详细内容是
Traceback (most recent call last):
File "DataviewerBackupRestorer.py", line 6, in <module>
File "RestorController.pyc", line 7, in <module>
File "psutil\__init__.pyc", line 136, in <module>
File "psutil\_psmswindows.pyc", line 14, in <module>
File "_psutil_mswindows.pyc", line 12, in <module>
File "_psutil_mswindows.pyc", line 10, in __load
ImportError: DLL load failed: The specified procedure could not be found.
看来需要一个dllpsutil http://code.google.com/p/psutil/打包过程中丢失。我尝试添加 py2exe 选项
py2exe_options = {"py2exe":{"includes":['decimal', '_mssql', 'uuid', 'psutil', '_psutil_mswindows']}}
但它不起作用。有任何想法吗?提前致谢!