Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install the win32com module. I know I should download the Python for Windows extension, but it does not work.

After I have installed Python for Windows and try import win32com.client, I get the following error message:

>>> import win32com.client

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

ImportError: No module named win32api

Trying to google for help on how to install win32api for Python does not help either; I am just referred to the Python for Windows extensions again.

share|improve this question

migrated from Jun 19 '13 at 9:36

This question came from our site for professional and enthusiast programmers.

Did you install the right binary of Python for Windows extensions for your version of Python? For example, if you install 64-bit Python, then install the 32-bit extensions, the pure-Python modules (like win32con) will import, but the C-extension modules (like win32api) will not; if you install Python 2.6, then install the extensions for 2.7, they may import but crash later; etc. – abarnert Jun 18 '13 at 21:00

Check sys.path to make sure the directory where the module is installed is in there, otherwise you have to add it (google PYTHONPATH windows for some help with that.)

share|improve this answer
Thanks for the advice. The problem turned out to be something different: for some reason there were two different Python installations in the registry, though both pointing to the same files. Re-installing it on both solved the problem. – user2498747 Jun 19 '13 at 6:15
I tried setting up PYTHONPATH in environment variable and still dont see this working. getting same error. – Soman Dubey Feb 28 at 9:23

look for the file in your computer by searching in all your computer "win32api" once you find it put it here C:\Python26\Lib\win32com "this suppossed you already install win32com library and you will find the file I think in" C:\Python26\Lib\site-packages\win32 "After all the file should be located in those two places in your computer for your module to work that's it in fini".

share|improve this answer
What you say is a total randomness. I think you are just wild-guessing solutions in order to catch some attention and possibly grind some reputation. This is sad. – Wojciech Kaczmarek Oct 8 '15 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .