1.下载pywin32:https://sourceforge.net/projects/pywin32/files/pywin32/
2.安装:
安装过程中报错:Python version 2.7 required, which was not found in the registry
解决方法:
注意新建的register.py是存在C盘,而不是G盘
3.导入:
运行报了个错:python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序
原因是我是32位系统32位python,但是为下载了个64位的pywin安装,重新下载安装就可以解决
refer:http://54im.com/python/python-importerror-dll-load-failed-1-%E4%B8%8D%E6%98%AF%E6%9C%89%E6%95%88%E7%9A%84-win32-%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F.html
4.试运行:
会弹出windows的对话框:
搞定!
作者:Miranda.Tang