Plasma
Plasma

Reputation: 2439

Can't run pywin32 post install

I'm trying to use winpexpect on windows 7 64 bit on an AMD processor. For this, I installed pywin32, the executable called pywin32-214.win-amd64-py2.7. The graphical installer seemed to run successfully, but I get this error when I try to import winpexpect:

>>> import winpexpect
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Alexei\wordseer_flask\venv\lib\site-packages\winpexpect.py", li
ne 11, in <module>
    import pywintypes
  File "C:\Users\Alexei\wordseer_flask\venv\lib\site-packages\pywin32-214-py2.7-
win32.egg\pywintypes.py", line 124, in <module>
    __import_pywin32_system_module__("pywintypes", globals())
  File "C:\Users\Alexei\wordseer_flask\venv\lib\site-packages\pywin32-214-py2.7-
win32.egg\pywintypes.py", line 64, in __import_pywin32_system_module__
    import _win32sysloader
ImportError: DLL load failed: %1 is not a valid Win32 application.

When I try to run C:\Python27\Scripts\pywin32_postinstall:

C:\Windows\system32>C:\Python27\Scripts\pywin32_postinstall.py -install
Traceback (most recent call last):
  File "C:\Python27\Scripts\pywin32_postinstall.py", line 601, in <module>
    install()
  File "C:\Python27\Scripts\pywin32_postinstall.py", line 311, in install
    LoadSystemModule(lib_dir, "pywintypes")
  File "C:\Python27\Scripts\pywin32_postinstall.py", line 149, in LoadSystemModu
le
    ('.dll', 'rb', imp.C_EXTENSION))
ImportError: DLL load failed: %1 is not a valid Win32 application.

Upvotes: 5

Views: 5961

Answers (1)

zijian sheng
zijian sheng

Reputation: 21

When I installed pyinstaller, I also got the same error: import _win32sysloader ImportError: DLL load failed: The specified module could not be found. Installing Microsoft Visual C++ 2010 Redistributable Package fixed the error.

Upvotes: 1

Related Questions