1

I tried to install pywin32 via the 32 bit python 2.6 msi installer and got this error:

error

I have no idea why, so I went and installed python 2.7 and tried again with the pywin32 2.7 installer and got an error that amounted to another error (Sorry for not being more specific, but python 2.7 is now gone from my computer. The error was incredibly vague and had "Error:" and then no more text after it if I recall correctly).

I can't figure out what this error means, however. I wanted to use pyinstaller but it requires pywin32, so after I couldn't install pywin32 I tried py2exe and got this error:

*** finding dlls needed ***
error: pywintypes26.dll: No such file or directory

So I'm pretty sure I need pywin32. Anyone have any ideas?

Jewel
  • 124
  • 3
  • 12

3 Answers3

1

I don't know the cause, but I got the same error (only with different line numbers, maybe from a different version of pywin32), and this fix worked for me, installing on windows 7:

  1. Extract the installer file to a directory using the free 7zip (or similar) program
  2. Copy everything in the PLATLIB directory to C:\Python26\Lib\site-packages
  3. Open a command prompt to the SCRIPT directory and type:

    python pywin32_postinstall.py -install

You must have Python already installed (perhaps obviously) and in your windows PATH environment variable for this to work. You can also try the testall script in that PLATLIB directory (though for me, that hung). After doing this, I was able to import pywin32 modules from the Python IDLE just fine.

(Trying to run the installer in compatibility mode didn't solve this for me.)

Alex Hall
  • 956
  • 10
  • 18
0

I did the following and worked for version 2.7 (I did not try 3.0 and up, but it should work too):

  1. Move the .exe file into the platlib (C:\Python27\Lib\site-packages)
  2. Run as admin the .exe file and you should be Good :)

If you want to check if it worked just do: import win32api and run it.

jww
  • 97,681
  • 90
  • 411
  • 885
SoKoS
  • 1
  • 2
-5

As of when I wrote this (Feb'12), IMO Python 2.5 is the most stable version of Python on Windows. I suggest you try re-installing everything on Python 2.5. I use it on Windows 7 and I don't have any issues whatsoever

Yanki Twizzy
  • 7,771
  • 8
  • 41
  • 68
  • 7
    This is a pretty big, and IMO, unjustified answer, in particular because python 2.5 is more than 5 years old. Please offer some supporting evidence for this claim – Andrew Walker Feb 11 '12 at 11:05
  • Wow, thanks. That actually worked. I am still interested in why the others don't work but this is perfectly fine. – Jewel Feb 11 '12 at 11:27
  • I told you. You just have to experience it to know it. Simple – Yanki Twizzy Feb 11 '12 at 11:30