I am trying to use winpexpect for windows 7 64 bit on an AMD processor. To do this, I installed pywin32, an executable file called pywin32-214.win-amd64-py2.7 . The graphical installer seemed to work successfully, but I get this error when trying 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.
source share