Ubuntu安装paramiko模块

ubuntu 16.04 安装paramiko模块 首先安装准备好环境 1、安装python-dev (   网上查的:      linux发行版通常会把类库的头文件和相关的pkg-config分拆成一个单独的xxx-dev(el)包. 以python为例, 以下情况你是需要python-dev的 你需要自己安装一个源外的python类库, 而这个类库内含需要编译的调用python api的c/c++文件 你自己写的一 阅读详情

Ubuntu安装paramiko模块报错如下:

vfast@vfast-virtual-machine:~/host_manage/server/core$ sudo pip3 install paramiko 

[sudo] password for vfast: 

sudo: pip3: command not found

尝试安装pip命令

vfast@vfast-virtual-machine:~/host_manage/server/core$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libexpat1-dev libpython3-dev libpython3.5-dev python-pip-whl python3-dev
  python3-setuptools python3-wheel python3.5-dev
Suggested packages:
  python-setuptools-doc
The following NEW packages will be installed:
  libexpat1-dev libpython3-dev libpython3.5-dev python-pip-whl python3-dev
  python3-pip python3-setuptools python3-wheel python3.5-dev
0 upgraded, 9 newly installed, 0 to remove and 262 not upgraded.
Need to get 39.2 MB of archives.
After this operation, 57.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1-dev amd64 2.1.0-7ubuntu0.16.04.3 [115 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5-dev amd64 3.5.2-2ubuntu0~16.04.4 [37.3 MB]
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libpython3-dev amd64 3.5.1-3 [6,926 B]
Get:4 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip-whl all 8.1.1-2ubuntu0.4 [1,110 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5-dev amd64 3.5.2-2ubuntu0~16.04.4 [413 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 python3-dev amd64 3.5.1-3 [1,186 B]
Get:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python3-pip all 8.1.1-2ubuntu0.4 [109 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 python3-setuptools all 20.7.0-1 [88.0 kB]
Get:9 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 python3-wheel all 0.29.0-1 [48.1 kB]
Fetched 39.2 MB in 2min 24s (272 kB/s)                                         
Selecting previously unselected package libexpat1-dev:amd64.
(Reading database ... 255248 files and directories currently installed.)
Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Selecting previously unselected package libpython3.5-dev:amd64.
Preparing to unpack .../libpython3.5-dev_3.5.2-2ubuntu0~16.04.4_amd64.deb ...
Unpacking libpython3.5-dev:amd64 (3.5.2-2ubuntu0~16.04.4) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../libpython3-dev_3.5.1-3_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.5.1-3) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../python-pip-whl_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip-whl (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python3.5-dev.
Preparing to unpack .../python3.5-dev_3.5.2-2ubuntu0~16.04.4_amd64.deb ...
Unpacking python3.5-dev (3.5.2-2ubuntu0~16.04.4) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../python3-dev_3.5.1-3_amd64.deb ...
Unpacking python3-dev (3.5.1-3) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../python3-pip_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python3-pip (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../python3-setuptools_20.7.0-1_all.deb ...
Unpacking python3-setuptools (20.7.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../python3-wheel_0.29.0-1_all.deb ...
Unpacking python3-wheel (0.29.0-1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Processing triggers for man-db (2.7.5-1) ...
Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Setting up libpython3.5-dev:amd64 (3.5.2-2ubuntu0~16.04.4) ...
Setting up libpython3-dev:amd64 (3.5.1-3) ...
Setting up python-pip-whl (8.1.1-2ubuntu0.4) ...
Setting up python3.5-dev (3.5.2-2ubuntu0~16.04.4) ...
Setting up python3-dev (3.5.1-3) ...
Setting up python3-pip (8.1.1-2ubuntu0.4) ...
Setting up python3-setuptools (20.7.0-1) ...

Setting up python3-wheel (0.29.0-1) ...

到此pip命令安装完成

重新安装paramiko模块

vfast@vfast-virtual-machine:~/host_manage/server/core$ sudo pip3 install paramiko
The directory '/home/vfast/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/vfast/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting paramiko
  Downloading paramiko-2.4.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 74kB/s 
Collecting pynacl>=1.0.1 (from paramiko)
  Downloading PyNaCl-1.2.1-cp35-cp35m-manylinux1_x86_64.whl (692kB)
    100% |████████████████████████████████| 696kB 124kB/s 
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/lib/python3/dist-packages (from paramiko)
Collecting bcrypt>=3.1.3 (from paramiko)
  Downloading bcrypt-3.1.4-cp35-cp35m-manylinux1_x86_64.whl (54kB)
    100% |████████████████████████████████| 61kB 237kB/s 
Collecting cryptography>=1.5 (from paramiko)
  Downloading cryptography-2.2.2.tar.gz (443kB)
    100% |████████████████████████████████| 450kB 95kB/s 
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3/dist-packages (from pynacl>=1.0.1->paramiko)
Collecting cffi>=1.4.1 (from pynacl>=1.0.1->paramiko)
  Downloading cffi-1.11.5-cp35-cp35m-manylinux1_x86_64.whl (420kB)
    100% |████████████████████████████████| 430kB 179kB/s 
Collecting idna>=2.1 (from cryptography>=1.5->paramiko)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 205kB/s 
Collecting asn1crypto>=0.21.0 (from cryptography>=1.5->paramiko)
  Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
    100% |████████████████████████████████| 102kB 194kB/s 
Collecting pycparser (from cffi>=1.4.1->pynacl>=1.0.1->paramiko)
  Downloading pycparser-2.18.tar.gz (245kB)
    100% |████████████████████████████████| 256kB 136kB/s 
Installing collected packages: pycparser, cffi, pynacl, bcrypt, idna, asn1crypto, cryptography, paramiko
  Running setup.py install for pycparser ... done
  Found existing installation: idna 2.0
    Not uninstalling idna at /usr/lib/python3/dist-packages, outside environment /usr
  Found existing installation: cryptography 1.2.3
    Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usr
  Running setup.py install for cryptography ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-l07miq32/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-6uy2sprb-record/install-record.txt --single-version-externally-managed --compile:
    /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/cryptography
    copying src/cryptography/__about__.py -> build/lib.linux-x86_64-3.5/cryptography
    copying src/cryptography/__init__.py -> build/lib.linux-x86_64-3.5/cryptography
    copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-3.5/cryptography
    copying src/cryptography/fernet.py -> build/lib.linux-x86_64-3.5/cryptography
    copying src/cryptography/utils.py -> build/lib.linux-x86_64-3.5/cryptography
    creating build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-3.5/cryptography/x509
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat
    copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/mac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings
    copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/backends
    copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends
    copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl
    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl
    running egg_info
    writing requirements to src/cryptography.egg-info/requires.txt
    writing top-level names to src/cryptography.egg-info/top_level.txt
    writing dependency_links to src/cryptography.egg-info/dependency_links.txt
    writing src/cryptography.egg-info/PKG-INFO
    warning: manifest_maker: standard file '-c' not found
    
    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*' found under directory 'vectors'
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-3.5/_padding.c'
    creating build/temp.linux-x86_64-3.5
    generating cffi module 'build/temp.linux-x86_64-3.5/_constant_time.c'
    generating cffi module 'build/temp.linux-x86_64-3.5/_openssl.c'
    building '_openssl' extension
    creating build/temp.linux-x86_64-3.5/build
    creating build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c build/temp.linux-x86_64-3.5/_openssl.c -o build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5/_openssl.o -Wconversion -Wno-error=sign-conversion
    build/temp.linux-x86_64-3.5/_openssl.c:493:30: fatal error: openssl/opensslv.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
  Can't rollback cryptography, nothing uninstalled.
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-l07miq32/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-6uy2sprb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-l07miq32/cryptography/

You are using pip version 8.1.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

出现上面的报错参考链接http://blog.51cto.com/francis198/1868427发现是缺少库文件libssl-dev

安装库文件

vfast@vfast-virtual-machine:~/host_manage/server/core$ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libssl-doc zlib1g zlib1g-dev
The following NEW packages will be installed:
  libssl-dev libssl-doc zlib1g-dev
The following packages will be upgraded:
  zlib1g
1 upgraded, 3 newly installed, 0 to remove and 261 not upgraded.
Need to get 2,642 kB of archives.
After this operation, 10.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g amd64 1:1.2.8.dfsg-2ubuntu4.1 [51.2 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.1 [168 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.11 [1,345 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.11 [1,079 kB]
Fetched 2,642 kB in 10s (259 kB/s)                                             
(Reading database ... 255634 files and directories currently installed.)
Preparing to unpack .../zlib1g_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...
Unpacking zlib1g:amd64 (1:1.2.8.dfsg-2ubuntu4.1) over (1:1.2.8.dfsg-2ubuntu4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up zlib1g:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Selecting previously unselected package zlib1g-dev:amd64.
(Reading database ... 255634 files and directories currently installed.)
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.11_amd64.deb ...
Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.11) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.2g-1ubuntu4.11_all.deb ...
Unpacking libssl-doc (1.0.2g-1ubuntu4.11) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.11) ...
Setting up libssl-doc (1.0.2g-1ubuntu4.11) ...

重现安装paramiko模块

vfast@vfast-virtual-machine:~/host_manage/server/core$ sudo pip3 install paramiko
The directory '/home/vfast/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/vfast/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting paramiko
  Downloading paramiko-2.4.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 293kB/s 
Requirement already satisfied (use --upgrade to upgrade): pynacl>=1.0.1 in /usr/local/lib/python3.5/dist-packages (from paramiko)
Collecting cryptography>=1.5 (from paramiko)
  Downloading cryptography-2.2.2.tar.gz (443kB)
    100% |████████████████████████████████| 450kB 277kB/s 
Requirement already satisfied (use --upgrade to upgrade): bcrypt>=3.1.3 in /usr/local/lib/python3.5/dist-packages (from paramiko)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/lib/python3/dist-packages (from paramiko)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3/dist-packages (from pynacl>=1.0.1->paramiko)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in /usr/local/lib/python3.5/dist-packages (from pynacl>=1.0.1->paramiko)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.1 in /usr/local/lib/python3.5/dist-packages (from cryptography>=1.5->paramiko)
Requirement already satisfied (use --upgrade to upgrade): asn1crypto>=0.21.0 in /usr/local/lib/python3.5/dist-packages (from cryptography>=1.5->paramiko)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.5/dist-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko)
Installing collected packages: cryptography, paramiko
  Found existing installation: cryptography 1.2.3
    Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usr
  Running setup.py install for cryptography ... done
Successfully installed cryptography-2.2.2 paramiko-2.4.1
You are using pip version 8.1.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.



vfast@vfast-virtual-machine:~/host_manage/server/core$ python3

Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>> 

到此模块安装成功



ubuntu下paramiko安装 三个包按ecdsa--pycryto---paramiko分别解压执行以下命令 sudo python3 setup.py build sudo python3 setup.py install 立即下载

相关推荐

python_ubuntun_paramiko安装包

欢迎下载,满足各种类型的ubuntun的安装条件,按照这个安装包一步步来即可

pip卸载失败 Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usrCa

所以删除/usr/lib/python3/dist-packages路径下对应的cryptography-3.4.8.egg-info/

weixin_50268209的博客 2494

PTA-浙大版 《Python程序设计》 第三章编程题目及答案

博主第一次写CSDN的博客,所以排版上可能有些不尽人意,代码部分均为自己的思路,可能复杂或者考虑欠妥,欢迎大家一起讨论~ 第一题:大于身高的平均值 这里用了np数组求得平均数,当然for循环累加也是可以的 import numpy as np data = input().split() data = list(map(int,data)) avg = np.mean(data) for i in data: if i > avg: print(i,end = '

Legendwqs的博客 1万+

ubuntu16.04离线安装paramiko库

2)从一台已安装python3.5版本的pip3的执行程序拷贝到离线主机中。1)在外网环境下载paramiko安装包及依赖包。4.安装python3-setuptools。3)解压缩并安装setuptools。2)拷贝到待安装离线主机,并安装。2.安装python3-dev。3.安装libffi-dev。3)拷贝到离线主机上并安装。2)下载deb包及依赖包。3)拷贝到离线主机并安装。2)下载deb包及依赖包。3)拷贝到离线主机并安装。5.安装paramiko。3)手动安装pip3。

zerfew的博客 1229

Altium Designer(AD)的简易使用

一、绘制原理图、原理图库 首先来说明原理图的概念。 根据百度百科,原理图,顾名思义就是表示电路板上各器件之间连接原理的图表。也就是表示芯片上的引脚连接什么元件,各个元件谁和谁相连,电源电压的大小之类的。​ 再来说一下原理图和原理图库的区别和联系。 原理图是某个产品的原理图设计文件;原理图库是设计原理图时用到的电子元件的电路符号的集合。绘制PCB板时先设计原理图即建立原理图文件,而在原理图文件中设计原理图前必须将原理图库文件加载到原理图编辑环境才能使用其中的电路符号。 接下来说明如...

qq_52630607的博客 2万+

SAP公司间外协业务流程以及配置说明

SAP公司间外协业务流程以及配置说明

竹大的博客 7188

gpdb-5.28.1源码编译安装

简单记录一下源码编译时遇到的问...

专注数据库、大数据领域干货分享,用严谨的数据技术广交天下朋友。 1185

零基础玩转华为AP 4050DN-HD:FAT模式家庭无线网络配置实战

本文为零基础用户提供华为AP 4050DN-HD从FIT模式转换为FAT模式的完整实战教程。详细介绍了固件升级、模式转换以及配置家庭无线网络(包括路由、DHCP、Wi-Fi和NAT)的每一步操作,帮助用户将企业级瘦AP改造为高性能家庭胖AP,打造稳定可靠的家庭网络环境。

weixin_29196613的博客 651

ubuntu16.04安装paramiko库方法

ubuntu16.04使用默认python3.5版本安装paramiko库

zerfew的博客 549

2022年TI杯模拟电⼦系统设计专题邀请赛——李萨如图形演示装置

本次装置主要是对输入的正弦信号进行频率变换,并将原输入正弦信号作为 X 轴信号、变换后的正弦信号作为 Y 轴信号,绘制李萨如图形。采用 EK-TM4C123GXL 板卡作为主控;频率变换采用“锁向环+计数器”实现 1-5 倍频的频率变换控制;李萨如图形采用两个 AD通道采集原输入的正弦信号作为 X 轴信号和频率变换后的正弦信号作为 Y 轴信号,绘制李萨如图形。

qq_45890466的博客 7780

ERGM指数随机图模型全解析:从基础原理到R语言实操

从社交网络中的互惠、传递性和同质性等基本现象切入,介绍网络数据与传统回归分析的本质差异——边与边之间的依赖关系。指数随机图模型(ERGM)正是为刻画这种依赖结构而设计的统计框架,它通过指数族分布将网络结构效应显式建模,结合MCMC方法完成参数估计。ERGM在组织协作、传播扩散、生物生态等领域的应用日益广泛,其扩展模型TERGM、GERGM和多层ERGM进一步支持时序、权重与多重关系网络。本文系统梳理ERGM的理论基础、核心统计量、扩展模型选型及R语言实操要点,帮助研究者理解网络生成机制并完成收敛性诊断与结果

weixin_29050271的博客 386

ubuntu配置pip安装paramiko模块

本文以ubuntu16为例说明paramiko的安装过程sunny@ubuntu:~$uname-a Linuxubuntu4.4.0-31-generic#50-UbuntuSMPWedJul1300:07:12UTC2016x86_64x86_64x86_64GNU/Linux1.配置pip初始安装的系统需要对apt进行update,类似c...

weixin_33969116的博客 626

联想ThinkServer SR588 重装raid5阵列信息(装完centos7后,找不到硬盘)

这里写自定义目录标题找不到硬盘选择光盘启动 找不到硬盘 装完centos7之后,提示重启,重启之后,就一直无法启动。 进入bios 看了,确实是有设置硬盘为第一启动选项。 选择光盘启动 本地标准硬盘也是找不到。 1、 重启进入bios在系统手设置里找到存储信息, 然后找到如图选项回车进入。 选择主目录进入。 进入Configuration Management 里面 先清除原来的设置信息 选择已启用在yes 提示清除成功。 返回上一目录选择,选择 Create Virtual Drive 再选择S

熠铭心时空的博客 2万+

paramiko模块依赖linux,ubuntu14.04.5安装paramiko模块pip install paramiko出现一堆问题的解决过程...

根据paramiko官网的指示,可以使用pip安装paramiko模块默认安装最新的稳定版本的paramiko使用pip安装paramikosudo pip3 install paramiko出现一堆错误信息:liuxin@sunshine-virtual-machine:~/work/python/python/socket/socketserver/ftp_client$ sudo pip3 ...

weixin_39997400的博客 407

英飞凌TC3xx之一起认识GTM系列(四)如何实现GTM与GPIO关联的配置(ATOM/TIM实例)

本文详细描述了针对英飞凌TC3xx芯片,如何运用GTM与GPIO之间的连接性,根据实际应用的需要对TOM和TIM相关寄存器进行配置。

无所适从的我的博客 3547

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

在Ubuntu 14.04.3上安装python中的paramiko模块

下面是安装命令 cd /usr/local/src git clone https://github.com/paramiko/paramiko.git cd paramiko easy_install ./ 验证安装是否成功

雪峰流云 3866

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

no python interpreter ubuntu_Ubuntu Python“没有名为paramiko的模块”

So I'm trying to use Paramiko on Ubuntu with Python 2.7, but import paramiko causes this error:Traceback (most recent call last):File "", line 1, in ImportError: No module named paramikoThe other ques...

weixin_39618169的博客 182

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

ubuntu14.04.5安装paramiko模块pip install paramiko出现一堆问题的解决过程

为什么80%的码农都做不了架构师?>>> ...

weixin_34416754的博客 959

Ubuntu16.04安装paramiko,可以远程控制树莓派的模块

apt install python3-pip apt-get install libssl-dev pip3 install paramiko

怨行客 408

python paramiko安装_python安装paramiko模块

一、依赖模块PyCrypto - The Python Cryptography Toolkit二、下载地址三、安装1、安装pycrypto$tar-zxvfpycrypto-2.0.1.tar.gz$cdpycrypto-2.0.1$pythonsetup.pybuild$sudopythonsetup.pyinstall2、安装paramiko$tar-zxvfp...

weixin_39781550的博客 148

no python interpreter ubuntu,Ubuntu Python“没有名为paramiko的模块”

So I'm trying to use Paramiko on Ubuntu with Python 2.7, but import paramiko causes this error:Traceback (most recent call last):File "", line 1, in ImportError: No module named paramikoThe other ques...

weixin_39875941的博客 131

安装paramiko

前记: 各种奇葩事情都让我遇上了。。。 1.准备: 1>需要安装python 2>需要安装PyCrypto 2.安装python---省略 3.安装PyCrypto 1>检查python-dev模块是否安装 否则会报错,编译时报错:error: command 'gcc' failed with exit status 1 a.安装python-dev模块 下载:sudo a...

weixin_30414635的博客 82

Python paramiko模块

paramiko模块用于对远程服务器的操作。 一、Ubuntu 14.04下安装 paramiko包: 1、首先安装Crypto包: sudo apt-get install python-crypto 测试安装: python>>> import Crypto 2、安装paramiko包: sudo apt-get in...

182

【收藏】python的paramiko模块使用

【安装】 依赖模块:PyCrypto - The Python Cryptography Toolkit        wget http://www.lag.net/paramiko/download/paramiko-1.7.6.tar.gz   wget http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.4.1.ta

求人不如求己,思考才能进步! 2万+

Ubuntu安装python3的包paramiko报错Unknown distribution option: ‘cffi_modules‘

Ubuntu 安装paramiko时候报错。 当前提示是说 Unknown distribution option: ‘cffi_modules’ 未知的分发选项:“cffi_modules” 解决: 1.pip3 install cffi 2.pip install --upgrade pip 3.再次pip3 install paramiko 搞定。

小高工作室 1013
上一篇: broker创建dg的优势
下一篇: 主策略提示IPSEC服务没有启动
linuxvfast
博客等级 码龄10年 6粉丝 132原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址