1

I am trying to install ssh2-python in windows via pip command. I am getting the following error. Can anyone of you let me know what this error is and how this can be fixed.

Collecting ssh2-python
  Downloading https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352
9e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz (1.1MB)
    100% |################################| 1.1MB 6.6MB/s
Installing collected packages: ssh2-python
  Running setup.py install for ssh2-python ... error
    Complete output from command c:\python34\python.exe -u -c "import setuptools
C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\pip-install-ra6s5ztc\\ssh2-python\
tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();
file__, 'exec'))" install --record C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-re
-record.txt --single-version-externally-managed --compile:
    'cmake' is not recognized as an internal or external command,
    operable program or batch file.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-ra6s5ztc\ssh2-pyt
6, in <module>
        build_ssh2()
      File "C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-ra6s5ztc\ssh2-pyt
", line 24, in build_ssh2
        shell=True, env=os.environ)
      File "c:\python34\lib\subprocess.py", line 561, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'cmake ../libssh2 -DBUILD_SHARED_LIBS
_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON     -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND
n-zero exit status 1

    ----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\
Data\\Local\\Temp\\2\\pip-install-ra6s5ztc\\ssh2-python\\setup.py';f=getattr(tok
__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fil
l --record C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-record-xifer3sm\install-re
sion-externally-managed --compile" failed with error code 1 in C:\Users\ADMINI~1
\pip-install-ra6s5ztc\ssh2-python\

Thanks, SP

Sujesh Surya
  • 143
  • 1
  • 1
  • 12
  • 1
    Was ale to resolve this.This looks to be issue with Python Version 3.8. Looks like ssh2-python is not yet supported in python 3.8. I was able to install this in Python version 3.7. Will have this closed – Sujesh Surya Mar 03 '20 at 22:37

1 Answers1

0

python-3.10.10-amd64.exe works fine to me, but I have the similar issue on python 3.11.3

Andy
  • 434
  • 5
  • 7