简体   繁体   中英

Python3.5 ssh2-python installation

I am trying to install ssh2-python package to python3 (Raspberry PI 3 model B), OS: Linux system, kernel-release 4.4.38-v7+ Every time it crashes with error:

1, Failed building wheel for ssh2-python

I tried:

pip3.5 install ssh2-python
pip3 install ssh2-python
pip3.5 install ssh2-python --no-cache-dir
pip3 install ssh2-python --no-cache-dir
pip3.5 install wheel, and again installation of package, and again failed.
pip3 install wheel, and again installation of package, and again failed.

I can see package in pip3.5 search list, but cant install it:/

What am i doing wrong?

pip3.5 install ssh2-python -vvv

Created temporary directory: /tmp/pip-ephem-wheel-cache-8dn96gtm
Created temporary directory: /tmp/pip-req-tracker-h6ml7zu3
Created requirements tracker '/tmp/pip-req-tracker-h6ml7zu3'
Created temporary directory: /tmp/pip-install-53rwbqu9
Collecting ssh2-python
  1 location(s) to search for versions of ssh2-python:
  * https://pypi.org/simple/ssh2-python/
  Getting page https://pypi.org/simple/ssh2-python/
  Found index url https://pypi.org/simple
  Looking up "https://pypi.org/simple/ssh2-python/" in the cache
  Request header has "max_age" as 0, cache bypassed
  Starting new HTTPS connection (1): pypi.org:443
  https://pypi.org:443 "GET /simple/ssh2-python/ HTTP/1.1" 304 0
  Analyzing links from page https://pypi.org/simple/ssh2-python/
    Found link https://files.pythonhosted.org/packages/1a/46/574b539fdc03ad45d76e92ed575e74582e28576bc103f7cdd0f05677093d/ssh2-python-0.1b1.tar.gz#sha256=b0656e22e005eee2326c9574141ca9d51374cee43065288c2beb9dd82da432db (from https://pypi.org/simple/ssh2-python/), version: 0.1b1
    Found link https://files.pythonhosted.org/packages/05/e5/b50f02a31d455fe78afbd265b6dc45268033eca4b04d4af93a42295714ce/ssh2-python-0.2.0.tar.gz#sha256=71592c8b899ab7ea177f66738b483fffabd964702dc12f41d4913158e758e3e2 (from https://pypi.org/simple/ssh2-python/), version: 0.2.0
    Found link https://files.pythonhosted.org/packages/89/a2/a81a4d0fd9c1926f3deeb07ee13a3ff28153e4db2bf7092b0e584f0b85b5/ssh2-python-0.2.1.tar.gz#sha256=af8303eee7be40330de57766190299f227a19cfd9447b0d38fc78bcbc2f7d34e (from https://pypi.org/simple/ssh2-python/), version: 0.2.1
    Found link https://files.pythonhosted.org/packages/5b/26/a6996656d423e45c96a3ebb534f3b6123ce30e38424f9831e82175d74ed7/ssh2-python-0.3.0.tar.gz#sha256=5c10de0c55facb3ea8e4d2b6e283850113dd107db9acae96a169d949329838cf (from https://pypi.org/simple/ssh2-python/), version: 0.3.0
    Found link https://files.pythonhosted.org/packages/8d/fa/5fc46561bd678bea21cbcfbdf50e0dc9dd778105fa8480df8c0526ddda37/ssh2-python-0.3.1.post2.tar.gz#sha256=e93af551096acc221fc7c843cca59743361f8b3dd71ad0271860c17e26ebecde (from https://pypi.org/simple/ssh2-python/), version: 0.3.1.post2
    Found link 
...
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/c3/d5/a694094a18b10301f5f55f007f54e9fc18d41b90e53649e972ba2d1fb909/ssh2_python-0.18.0.post1-cp36-cp36m-manylinux1_x86_64.whl#sha256=de151500a2a027a29bca3d7196c76008b41bb97db29378f29c4651ba1bcb00e8 (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-win32: https://files.pythonhosted.org/packages/fa/15/2f687e75649b4f074719b47d813af8c48a2bede3756d1fa3b342cefba6b8/ssh2_python-0.18.0.post1-cp36-cp36m-win32.whl#sha256=4b5ba1390ff5e8faa6b2409df750e4650de3934c3b76ad707d7b54b477600226 (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-win_amd64: https://files.pythonhosted.org/packages/fd/98/e661c4bcf5718db1abf98ea0b192c7d24744c9b149ddf2562598c7490b1e/ssh2_python-0.18.0.post1-cp36-cp36m-win_amd64.whl#sha256=f508144d684b3c3c0f264ce67058f05ae3729ae77cc3a8f2051b442e01594849 (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-macosx_10_12_x86_64: https://files.pythonhosted.org/packages/c1/6e/8a8f3ff913df75ba5ea78b5d9693294acaf4226d0c47dbfde6deccfe90cf/ssh2_python-0.18.0.post1-cp37-cp37m-macosx_10_12_x86_64.whl#sha256=097d74684172f163d5025aef316987c1c7acf852d9fb75e4735720c8690adf87 (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-macosx_10_13_x86_64: https://files.pythonhosted.org/packages/d6/45/0be08ceb997a2fe3c7294b339d699ffae88ca27a0684961ea88a6d04574a/ssh2_python-0.18.0.post1-cp37-cp37m-macosx_10_13_x86_64.whl#sha256=9410b63c2361b2b65a55b5e8dc8187270de0f81e11864a427ad52b82b926bcc9 (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/05/8d/b1815e709f8d67176bfbe02febdc320dc2006cce6b32ef0036727f328ca7/ssh2_python-0.18.0.post1-cp37-cp37m-manylinux1_x86_64.whl#sha256=692cf27ddc5583da9b07b0f0348f0577579f8d798a0b8e4bf495b8d7f19fc854 (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-win32: https://files.pythonhosted.org/packages/3e/1e/7b70cd99d65bbe45ab9d81a1c71063635f7aff2d3fb5e7300965045cc2c3/ssh2_python-0.18.0.post1-cp37-cp37m-win32.whl#sha256=57a4452dfc5c7f414de14e32f29e21f680fb8d7bdf94306e5f6bc8c2a235fa7a (from https://pypi.org/simple/ssh2-python/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-win_amd64: https://files.pythonhosted.org/packages/12/47/89c3e8079eefc43e249038ae9a9b1cf19f9ad19eaa07cc206072f4fd6465/ssh2_python-0.18.0.post1-cp37-cp37m-win_amd64.whl#sha256=49aaa9d48cf52798d89f466a5e774e9dab8b76dc380b90645fd8d5c6622df177 (from https://pypi.org/simple/ssh2-python/)
  Given no hashes to check 34 links for project 'ssh2-python': discarding no candidates
  Using version 0.18.0.post1 (newest of versions: 0.2.0, 0.2.1, 0.3.0, 0.3.1.post2, 0.3.1.post3, 0.4.0, 0.5.0, 0.5.0.post1, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.7.0.post2, 0.7.0.post3, 0.7.0.post4, 0.7.0.post5, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.11.0.post1, 0.13.0.post2, 0.14.0, 0.15.0, 0.15.0.post2, 0.15.0.post4, 0.15.0.post7, 0.15.0.post8, 0.15.0.post9, 0.16.0, 0.17.0, 0.18.0.post1)
  Created temporary directory: /tmp/pip-unpack-s70rttwu
  Looking up "https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352cf3e1b6d7b10d2e1174d99e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz" in the cache
  Current age based on date: 164092
  Ignoring unknown cache-control directive: immutable
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 164092
  Using cached https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352cf3e1b6d7b10d2e1174d99e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz
  Downloading from URL https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352cf3e1b6d7b10d2e1174d99e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz#sha256=180c2728796f777a5856b23e5e1656a15a3e8602b4270348f892599ae5426f45 (from https://pypi.org/simple/ssh2-python/)
  Added ssh2-python from https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352cf3e1b6d7b10d2e1174d99e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz#sha256=180c2728796f777a5856b23e5e1656a15a3e8602b4270348f892599ae5426f45 to build tracker '/tmp/pip-req-tracker-h6ml7zu3'
    Running setup.py (path:/tmp/pip-install-53rwbqu9/ssh2-python/setup.py) egg_info for package ssh2-python
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/ssh2_python.egg-info
    writing pip-egg-info/ssh2_python.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/ssh2_python.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/ssh2_python.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/ssh2_python.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/ssh2_python.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*' found under directory 'docker'
    warning: no previously-included files found matching '.travis.yml'
    writing manifest file 'pip-egg-info/ssh2_python.egg-info/SOURCES.txt'
  Source in /tmp/pip-install-53rwbqu9/ssh2-python has version 0.18.0.post1, which satisfies requirement ssh2-python from https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352cf3e1b6d7b10d2e1174d99e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz#sha256=180c2728796f777a5856b23e5e1656a15a3e8602b4270348f892599ae5426f45
  Removed ssh2-python from https://files.pythonhosted.org/packages/fa/44/9a037be30680f775d352cf3e1b6d7b10d2e1174d99e58b71efdbed4d1dec/ssh2-python-0.18.0.post1.tar.gz#sha256=180c2728796f777a5856b23e5e1656a15a3e8602b4270348f892599ae5426f45 from build tracker '/tmp/pip-req-tracker-h6ml7zu3'
Building wheels for collected packages: ssh2-python
  Created temporary directory: /tmp/pip-wheel-azr3ylrb
  Building wheel for ssh2-python (setup.py) ...   Destination directory: /tmp/pip-wheel-azr3ylrb
  Running command /usr/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-azr3ylrb --python-tag cp35
  /bin/sh: 1: cmake: not found
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-53rwbqu9/ssh2-python/setup.py", line 36, in <module>
      build_ssh2()
    File "/tmp/pip-install-53rwbqu9/ssh2-python/_setup_libssh2.py", line 24, in build_ssh2
      shell=True, env=os.environ)
    File "/usr/lib/python3.5/subprocess.py", line 581, 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 127
error
  ERROR: Failed building wheel for ssh2-python
  Running setup.py clean for ssh2-python
  Running command /usr/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
  running clean
  'build/lib.linux-armv7l-3.5' does not exist -- can't clean it
  'build/bdist.linux-armv7l' does not exist -- can't clean it
  'build/scripts-3.5' does not exist -- can't clean it
Failed to build ssh2-python
Installing collected packages: ssh2-python
  Created temporary directory: /tmp/pip-record-3jlroynr
    Running command /usr/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-53rwbqu9/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 /tmp/pip-record-3jlroynr/install-record.txt --single-version-externally-managed --compile
    /bin/sh: 1: cmake: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-53rwbqu9/ssh2-python/setup.py", line 36, in <module>
        build_ssh2()
      File "/tmp/pip-install-53rwbqu9/ssh2-python/_setup_libssh2.py", line 24, in build_ssh2
        shell=True, env=os.environ)
      File "/usr/lib/python3.5/subprocess.py", line 581, 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 127
  Running setup.py install for ssh2-python ... error
Cleaning up...
  Removing source in /tmp/pip-install-53rwbqu9/ssh2-python
Removed build tracker '/tmp/pip-req-tracker-h6ml7zu3'
ERROR: Command errored out with exit status 1: /usr/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-53rwbqu9/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 /tmp/pip-record-3jlroynr/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/base_command.py", line 188, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/commands/install.py", line 407, in run
    use_user_site=options.use_user_site,
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/req/__init__.py", line 58, in install_given_reqs
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/req/req_install.py", line 959, in install
    spinner=spinner,
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/utils/misc.py", line 931, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /usr/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-53rwbqu9/ssh2-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-53rwbqu9/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 /tmp/pip-record-3jlroynr/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

/bin/sh: 1: cmake: not found

You don't have cmake installed, which looks to be a build dependency for this ssh2-python package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM