安装ssh-2时命令错误退出状态为1

时间:2020-09-21 06:30:55

标签: python python-3.8 ssh2

我正在使用python 3.8,操作系统是Windows 10。

我正在尝试执行以下命令:

pip install ssh2-python

我收到此错误:

***Collecting ssh2-python
  Using cached ssh2-python-0.19.0.tar.gz (1.1 MB)
Using legacy 'setup.py install' for ssh2-python, since package 'wheel' is not installed.
Installing collected packages: ssh2-python
    Running setup.py install for ssh2-python ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\kobil\pycharmprojects\pythonproject\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Use
rs\\kobil\\AppData\\Local\\Temp\\pip-install-su_78cgh\\ssh2-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\kobil\\AppData\\Local\\Temp\\pip-install-su_
78cgh\\ssh2-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec
(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kobil\AppData\Local\Temp\pip-record-1wp8xioq\install-record.txt' --single-version-
externally-managed --compile --install-headers 'c:\users\kobil\pycharmprojects\pythonproject\venv\include\site\python3.8\ssh2-python'
         cwd: C:\Users\kobil\AppData\Local\Temp\pip-install-su_78cgh\ssh2-python\
    Complete output (11 lines):
    '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\kobil\AppData\Local\Temp\pip-install-su_78cgh\ssh2-python\setup.py", line 36, in <module>
        build_ssh2()
      File "C:\Users\kobil\AppData\Local\Temp\pip-install-su_78cgh\ssh2-python\_setup_libssh2.py", line 21, in build_ssh2
        check_call('cmake ../libssh2 -DBUILD_SHARED_LIBS=ON \
      File "C:\Users\kobil\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'cmake ../libssh2 -DBUILD_SHARED_LIBS=ON     -DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON     -DENABLE
_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\kobil\pycharmprojects\pythonproject\venv\scripts\python.exe' -u -c 'import sys, setuptools, tok
enize; sys.argv[0] = '"'"'C:\\Users\\kobil\\AppData\\Local\\Temp\\pip-install-su_78cgh\\ssh2-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\kobil\\AppD
ata\\Local\\Temp\\pip-install-su_78cgh\\ssh2-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"
'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kobil\AppData\Local\Temp\pip-record-1wp8xioq\inst
all-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\kobil\pycharmprojects\pythonproject\venv\include\site\python3.
8\ssh2-python' Check the logs for full command output.***

我该怎么办?

0 个答案:

没有答案