3

I just upgraded Anaconda and Spyder to the latest version (Spyder 5.1.5), but since that I get an error message every time I start Spyder:

enter image description here

However, I have tried to install and update paramiko with both conda install paramiko and conda update paramiko, which appears to be of version 2.8.1 (this is the output from conda list about paramiko:

paramiko                  2.8.1              pyhd3eb1b0_0

I'm not sure if I even use this package, but I would be much happier if I didn't get this error message upon Spyder startup.

jolindbe
  • 2,752
  • 2
  • 17
  • 18
  • It's actually a bug I guess. Pls, check below link.. https://stackoverflow.com/a/66959690/15358800 – Bhargav - Retarded Skills Jan 10 '22 at 14:44
  • @Bhargav, but it says that that bug was fixed almost two years ago, and I just got the latest Spyder version? – jolindbe Jan 10 '22 at 14:59
  • 1
    (*Spyder maintainer here*) Perhaps you're starting Spyder from a different environment than the one where you installed Paramiko. Please run the following code in the IPython console and also in the Anaconda Prompt to check: `import sys; sys.executable`. – Carlos Cordoba Jan 10 '22 at 22:25
  • In the ipython console it returns `'C:\\Anaconda3\\python.exe'`. In the Anaconda prompt it of course returns `'import' is not recognized as an internal or external command, operable program or batch file.` because the anaconda prompt is a Windows command line, not a python interpreter. However, running `import paramiko` in the ipython console renders an ImportError from cryptography.hazmat.bindings._openssl (DLL load failed). This sounds suspicious. Is a package broken? Which one? – jolindbe Jan 12 '22 at 07:47

2 Answers2

0

Try:

conda update paramiko

If it does not work:

pip uninstall paramiko
pip install pyqt5==5.12
pip install pyqtwebengine==5.12
pip install paramiko==2.4.0

This works for me. Hope it helps!

Thanks!

  • This broke my installation. When launching Spyder from within an environment, I get File "C:\Users\\.conda\envs\phd\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 264, in __init__ match = self._regex.search(version) TypeError: expected string or bytes-like object – Jim421616 Oct 12 '22 at 19:40
0

I found that the problem is caused by the "DLL load failed while importing _openssl" (you can try import paramiko in ipython kernel to see the errors), so you can go to the website https://slproweb.com/products/Win32OpenSSL.html to download openssl for your computer according to the system. After installation, try import paramiko again, and you'll find no errors this time. Then restart spyder you'll get the problem fixed.

Peter
  • 1
  • 2