自己想写一个可以读取windows服务器的cpu、内存、硬盘等信息的功能,需要使用到wmi
我安装了wmi,但是它依赖于win32com.client模块下的函数,我从sf官网下载了D:\pywin32-218
当我执行python setup.py install的时候就报错误了:
Building pywin32 2.7.218.0 Traceback (most recent call last): File "setup.py", line 1957, in <module> """ % dirs).split(), File "setup.py", line 605, in __init__ if os.path.isfile(os.path.join(sdk_dir, "include", "activdbg.h")): File "D:\Python27\lib\ntpath.py", line 64, in join result_drive, result_path = splitdrive(path) File "D:\Python27\lib\ntpath.py", line 114, in splitdrive if len(p) > 1: TypeError: object of type 'NoneType' has no len()
setup.py文件的 line 1957是这样的
WinExt_win32com_axdebug('axdebug', libraries="axscript", pch_header="stdafx.h", sources=(""" %(axdebug)s/AXDebug.cpp %(axdebug)s/PyIActiveScriptDebug.cpp %(axdebug)s/PyIActiveScriptErrorDebug.cpp %(axdebug)s/PyIActiveScriptSiteDebug.cpp %(axdebug)s/PyIApplicationDebugger.cpp %(axdebug)s/PyIDebugApplication.cpp %(axdebug)s/PyIDebugApplicationNode.cpp %(axdebug)s/PyIDebugApplicationNodeEvents.cpp %(axdebug)s/PyIDebugApplicationThread.cpp %(axdebug)s/PyIDebugCodeContext.cpp %(axdebug)s/PyIDebugDocument.cpp %(axdebug)s/PyIDebugDocumentContext.cpp %(axdebug)s/PyIDebugDocumentHelper.cpp %(axdebug)s/PyIDebugDocumentHost.cpp %(axdebug)s/PyIDebugDocumentInfo.cpp %(axdebug)s/PyIDebugDocumentProvider.cpp %(axdebug)s/PyIDebugDocumentText.cpp %(axdebug)s/PyIDebugDocumentTextAuthor.cpp %(axdebug)s/PyIDebugDocumentTextEvents.cpp %(axdebug)s/PyIDebugDocumentTextExternalAuthor.cpp %(axdebug)s/PyIDebugExpression.cpp %(axdebug)s/PyIDebugExpressionCallBack.cpp %(axdebug)s/PyIDebugExpressionContext.cpp %(axdebug)s/PyIDebugProperties.cpp %(axdebug)s/PyIDebugSessionProvider.cpp %(axdebug)s/PyIDebugStackFrame.cpp %(axdebug)s/PyIDebugStackFrameSniffer.cpp %(axdebug)s/PyIDebugStackFrameSnifferEx.cpp %(axdebug)s/PyIDebugSyncOperation.cpp %(axdebug)s/PyIEnumDebugApplicationNodes.cpp %(axdebug)s/PyIEnumDebugCodeContexts.cpp %(axdebug)s/PyIEnumDebugExpressionContexts.cpp %(axdebug)s/PyIEnumDebugPropertyInfo.cpp %(axdebug)s/PyIEnumDebugStackFrames.cpp %(axdebug)s/PyIEnumRemoteDebugApplications.cpp %(axdebug)s/PyIEnumRemoteDebugApplicationThreads.cpp %(axdebug)s/PyIMachineDebugManager.cpp %(axdebug)s/PyIMachineDebugManagerEvents.cpp %(axdebug)s/PyIProcessDebugManager.cpp %(axdebug)s/PyIProvideExpressionContexts.cpp %(axdebug)s/PyIRemoteDebugApplication.cpp %(axdebug)s/PyIRemoteDebugApplicationEvents.cpp %(axdebug)s/PyIRemoteDebugApplicationThread.cpp %(axdebug)s/stdafx.cpp """ % dirs).split(), ),
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。