spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.21k stars 1.59k forks source link

You have missing dependencies! # Mandatory:paramiko > 2.4.0 : None (NOK) #21022

Open zhu952760029 opened 1 year ago

zhu952760029 commented 1 year ago

Description

What steps will reproduce the problem?

internal errors and to inspect Spyder internals with the following commands: spy.app, spy.window, dir(spy)

Please do not use it to run your code

import paramiko Traceback (most recent call last): File "C:\Users\Lenovo\anaconda3\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 2, in File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko__init__.py", line 22, in from paramiko.transport import SecurityOptions, Transport File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\transport.py", line 129, in class Transport(threading.Thread, ClosingContextManager): File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\transport.py", line 190, in Transport if KexCurve25519.is_available(): File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\kex_curve25519.py", line 30, in is_available X25519PrivateKey.generate() File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\primitives\asymmetric\x25519.py", line 39, in generate from cryptography.hazmat.backends.openssl.backend import backend File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\backends\openssl__init__.py", line 6, in from cryptography.hazmat.backends.openssl.backend import backend File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 61, in from cryptography.hazmat.bindings.openssl import binding File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 14, in from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: DLL load failed while importing _openssl: 找不到指定的模块。

Traceback

Traceback (most recent call last):
  File "C:\Users\Lenovo\anaconda3\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 2, in <module>
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\__init__.py", line 22, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\transport.py", line 129, in <module>
    class Transport(threading.Thread, ClosingContextManager):
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\transport.py", line 190, in Transport
    if KexCurve25519.is_available():
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\paramiko\kex_curve25519.py", line 30, in is_available
    X25519PrivateKey.generate()
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\primitives\asymmetric\x25519.py", line 39, in generate
    from cryptography.hazmat.backends.openssl.backend import backend
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\backends\openssl\__init__.py", line 6, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 61, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "C:\Users\Lenovo\anaconda3\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: DLL load failed while importing _openssl: 找不到指定的模块。

Versions

Dependencies

# Mandatory:
atomicwrites >=1.2.0                             :  1.4.0 (OK)
chardet >=2.0.0                                  :  4.0.0 (OK)
cloudpickle >=0.5.0                              :  2.2.1 (OK)
cookiecutter >=1.6.0                             :  1.7.3 (OK)
diff_match_patch >=20181111                      :  20200713 (OK)
intervaltree >=3.0.2                             :  3.1.0 (OK)
IPython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0 :  8.12.0 (OK)
jedi >=0.17.2,<0.19.0                            :  0.18.1 (OK)
jellyfish >=0.7                                  :  0.9.0 (OK)
jsonschema >=3.2.0                               :  4.17.3 (OK)
keyring >=17.0.0                                 :  23.13.1 (OK)
nbconvert >=4.0                                  :  6.5.4 (OK)
numpydoc >=0.6.0                                 :  1.5.0 (OK)
paramiko >=2.4.0                                 :  None (NOK)
parso >=0.7.0,<0.9.0                             :  0.8.3 (OK)
pexpect >=4.4.0                                  :  4.8.0 (OK)
pickleshare >=0.4                                :  0.7.5 (OK)
psutil >=5.3                                     :  5.9.0 (OK)
pygments >=2.0                                   :  2.15.1 (OK)
pylint >=2.5.0,<3.0                              :  2.16.2 (OK)
pylint_venv >=2.1.1                              :  2.3.0 (OK)
pyls_spyder >=0.4.0                              :  0.4.0 (OK)
pylsp >=1.7.2,<1.8.0                             :  1.7.2 (OK)
pylsp_black >=1.2.0                              :  1.2.1 (OK)
qdarkstyle >=3.0.2,<3.2.0                        :  3.0.2 (OK)
qstylizer >=0.2.2                                :  0.2.2 (OK)
qtawesome >=1.2.1                                :  1.2.2 (OK)
qtconsole >=5.4.2,<5.5.0                         :  5.4.2 (OK)
qtpy >=2.1.0                                     :  2.2.0 (OK)
rtree >=0.9.7                                    :  1.0.1 (OK)
setuptools >=49.6.0                              :  65.6.3 (OK)
sphinx >=0.6.6                                   :  5.0.2 (OK)
spyder_kernels >=2.4.3,<2.5.0                    :  2.4.3 (OK)
textdistance >=4.2.0                             :  4.2.1 (OK)
three_merge >=0.1.1                              :  0.1.1 (OK)
watchdog >=0.10.3                                :  2.1.6 (OK)
zmq >=22.1.0                                     :  25.0.2 (OK)

# Optional:
cython >=0.21                                    :  None (NOK)
matplotlib >=3.0.0                               :  None (NOK)
numpy >=1.7                                      :  None (NOK)
pandas >=1.1.1                                   :  None (NOK)
scipy >=0.17.0                                   :  None (NOK)
sympy >=0.7.3                                    :  None (NOK)
zhu952760029 commented 1 year ago

(base) C:\Users\Lenovo>conda list paramiko

packages in environment at C:\Users\Lenovo\anaconda3:

#

Name Version Build Channel

paramiko 2.8.1 pyhd3eb1b0_0

zhu952760029 commented 1 year ago

You have missing dependencies!

Mandatory:paramiko > 2.4.0 : None (NOK)

Please install them to avoid this message. Note: Spyder could work without some of thesedependencies, however to have a smooth experiencewhen using Spyder we strong/yrecommend you toinstall all the listed missing dependencies. Failing to install these dependencies might result inbugs. Please be sure that any found bugs are not thedirect result of missing dependencies, prior toreporting a new issue.

dalthviz commented 1 year ago

Hi @zhu952760029 thank you for the feedback! Seems like your openssl installation is faulty? Could you check what happens when you try to import paramiko from a Python interpreter using an Anaconda prompt? Let us know!

neuralassembly commented 1 year ago

On Tuesday, when I create a new environment on anaconda, the same issue took place (paramiko error when launching spyder).

In such environment, importing paramiko showed the following errors. Therefore, I think that there were some problems on the installation of paramiko or cryptography. (There are no problems in "base" environment.)

(newenv) C:\Users\neura>python
Python 3.8.16 (default, Mar  2 2023, 03:18:16) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\paramiko\__init__.py", line 22, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\paramiko\transport.py", line 129, in <module>
    class Transport(threading.Thread, ClosingContextManager):
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\paramiko\transport.py", line 190, in Transport
    if KexCurve25519.is_available():
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\paramiko\kex_curve25519.py", line 30, in is_available
    X25519PrivateKey.generate()
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\cryptography\hazmat\primitives\asymmetric\x25519.py", line 39, in generate
    from cryptography.hazmat.backends.openssl.backend import backend
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\cryptography\hazmat\backends\openssl\__init__.py", line 6, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 61, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "C:\Users\neura\anaconda3\envs\newenv\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: DLL load failed while importing _openssl: ...

However,when I recreate a new environment on anaconda today, importing paramiko does not show the above errors. I think that the problems on the installation of paramiko or cryptography were fixed.

To fix the problematic environment, the following commands might work, although I have not tried them.

conda install cryptography --force-reinstall or conda install paramiko --force-reinstall

PS: I tried the above command, but they did not fix the problematic environment. Instead, the follwing procedures worked. First, please downgrade the cryptography by conda install cryptography=38.0.4 and then upgrade it by conda install cryptography=39.0.1

dalthviz commented 1 year ago

Thank you for sharing your findings here @neuralassembly !

dalthviz commented 1 year ago

I will close this as not related with Spyder then but let us know if you find something else!

ccordoba12 commented 1 year ago

Let's leave this one open for a while so that other users can find it when searching for a problem similar to this one.