I’m currently facing an issue with importing the _bcrypt module in Python, and I would greatly appreciate any help or insights you can provide.
I am using Python 3.9 on a Windows 10 Pro machine. the code calls paramiko which calls bcrypt
When I try to import paramiko, I encounter the following error:
Traceback (most recent call last): File "d:remote_connclient-copy.py", line 44, in import sys, os, paramiko, time File "C:Python39libsite-packagesparamiko__init__.py", line 22, in from paramiko.transport import ( File "C:Python39libsite-packagesparamikotransport.py", line 93, in from paramiko.dsskey import DSSKey File "C:Python39libsite-packagesparamikodsskey.py", line 37, in from paramiko.pkey import PKey File "C:Python39libsite-packagesparamikopkey.py", line 32, in import bcrypt File "C:Python39libsite-packagesbcrypt__init__.py", line 13, in from ._bcrypt import ( ImportError: DLL load failed while importing `_bcrypt`: The specified procedure could not be found.
I have already attempted the following troubleshooting steps:
- updated all packages
- Installed Microsoft Visual C++ Redistributable for Visual Studio 2015-20122 (x86/x64) and Microsoft Visual C++ Redistributable 2013 (x64).
- Installed OpenSSL with Git .
- Checked that the directory containing the DLL files is included in the PATH environment variable (C:Windowssystem32, C:Python39DLLs).
- Despite these efforts, the error persists. Could you please provide any suggestions or insights on how to resolve this issue? Is there anything I might be missing or any alternative approaches I could try? or how to know which DLLs files need?
Thank you in advance for your help!
Best regards
2
Answers
I ran into the same issue for latest versions of paramiko(3.4.0) and bcrypt(4.1.2). I tried installing a lower version of bcrypt but should be >=3.2 as latest paramiko version(3.4.0) requires bcrypt>=3.2. This worked for me.
Thank you very much, nrn15! I tried to install bcrypt(3.2.0) + paramiko(3.4.0) and I solved this issue!