Can't import win32crypt python module
Asked Answered
C

4

6

I have the 32 bit version of python 3.4 installed. I'm trying to use the win32crypt module after installing pywin32 but I get the following error message in git CLI:

import win32crypt ImportError: DLL load failed: The specified module could not be found.

As recommendedhere, I used dependency walker on the win32crypt.pyd file (located at C://Python34/Libsite-packages/win32 on my computer) and several dll are missing: PYTHON34.dll, PYWINTYPES34.DLL, GPSVC.DLL, IESHIMS.DLL.

Are these missing dll likely to cause the import failure? If so, how can I fix this?

Candlepower answered 1/5, 2014 at 11:18 Comment(0)
B
7

A more modern solution:

pip install pypiwin32

This contains .whl files to aid in installing on Windows.

Blackstone answered 28/5, 2017 at 21:43 Comment(0)
C
4

You don't need to copy/paste any dll, simply add the pywin32 module to the windows environment variable Path. Default is: "C:\Python34\Lib\site-packages\pywin32_system32".

Please note that dependency walker still shows missing dll, so maybe it is of doubtful utility in some cases.

Candlepower answered 1/5, 2014 at 11:18 Comment(0)
F
0

I try to use python x64, and it work.

Farny answered 21/1, 2020 at 5:40 Comment(0)
E
-1

another solution is that you can copy 2 dll files from "C:\Python34\Lib\site-packages\pywin32_system32" and paste them where ur .py file location is,and then use the command --add-data ".*.dll;." just make sure there're no more dll files but these two in this path. this is suitable when you are using '-F' command

Enthral answered 4/11, 2022 at 12:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.