简体   繁体   中英

unable to import win32com.client

I am trying to import win32com.client library gives me the following error:

>>> import win32com.client

Traceback (most recent call last):
  File "<pyshell#57>", line 1, in <module>
     import win32com.client
  File "C:\Python27\lib\site-packages\win32com\__init__.py", line 5, in  
    <module>       
    import win32api, sys, os
ImportError: No module named win32api
>>> 

Basically i am trying to send email using win32com.client . Kindly help.

Did you install the Win32 Extensions for Python ? Make sure you pick the correct installer for your system and version of Python otherwise it may not work correctly.

通过卸载所有python版本并仅安装一个来解决问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM