Can't import session from ssh2-python

94 views Asked by At

I have istalled libriaries Parallel-ssh and ssh2-python. But when i try import i get this: from pssh.clients import SSHClient I get this:

Traceback (most recent call last):
  File "D:\WORK\InTheNameOfQATest\PyProjects\tranzita2\test.py", line 1, in <module>
    from pssh.clients import SSHClient
  File "D:\WORK\InTheNameOfQATest\PyProjects\tranzita2\venv\Lib\site-packages\pssh\clients\__init__.py", line 19, in <module>
    from .native.parallel import ParallelSSHClient
  File "D:\WORK\InTheNameOfQATest\PyProjects\tranzita2\venv\Lib\site-packages\pssh\clients\native\__init__.py", line 19, in <module>
    from .parallel import ParallelSSHClient
  File "D:\WORK\InTheNameOfQATest\PyProjects\tranzita2\venv\Lib\site-packages\pssh\clients\native\parallel.py", line 20, in <module>
    from .single import SSHClient
  File "D:\WORK\InTheNameOfQATest\PyProjects\tranzita2\venv\Lib\site-packages\pssh\clients\native\single.py", line 27, in <module>
    from ssh2.session import Session, LIBSSH2_SESSION_BLOCK_INBOUND, LIBSSH2_SESSION_BLOCK_OUTBOUND
ImportError: DLL load failed while importing session: The specified module could not be found.

python 3.11

I have tried to install libriaries independently. Used several types of installing packages:

  1. pip install ssh2-python
  2. python -m installer ssh2_python-1.0.0-cp39-cp39-win_amd64.whl
  3. via PyCharm
  4. pip install git+https://github.com/ParallelSSH/ssh2-python.git
  5. python setup.py install

enter image description here I'm suggesting ssh2-python wasn't compiled right. I need help to fix that.

0

There are 0 answers