win32com没有从python文件导入 - DLL加载失败

时间:2016-02-18 00:01:21

标签: python error-handling win32com

我正在尝试将win32com.client模块导入python 2.7.10,这给了我错误

 Traceback (most recent call last):
      File "C:/Users/varma/Desktop/1.py", line 2, in <module>
        import win32api
    ImportError: DLL load failed: The specified module could not be found.

但是同样的方法是使用Python Shell和终端,如果我执行代码

则不会出现任何错误
import win32com.client

Code running in Sheel not giving any error

为什么在python文件中运行代码给出错误,如果在终端和shell上写的话,相同的代码没有给出任何错误? Error While running code from python file

1 个答案:

答案 0 :(得分:0)

卸载并再次安装win32修复了问题,感谢@ArtofWarfare

相关问题