Linux Installation Paramiko Module

Source: Internet
Author: User

Here we use Pip to install the Python package (Paramiko).


1. What is the PIP that we just said first?

On the Python website of Pip we can see that Pip is "A tool for installing and managing Python packages.", which means that Pip is a Python software Installation tool, Here's how to use the PIP:

Installation package:

Pip Install Somepackage

To view which files are installed when the package is installed:

Pip Show--files Somepackage

See which packages have updates:

Pip Show--files Somepackage

Update a software:

Pip Install--upgrade somepackage

Uninstalling the Software:

Pip Uninstall Somepackage


So, with Pip we can automatically install other packages, such as nose, virtualenv, distribute, Paramiko, etc. that we need


2. Install the PIP package

PIP website address: Https://pypi.python.org/pypi/pip



  1. [Email protected]:/tmp/pip-1.4.1$ tar-xvf pip-1.4.1.tar.gz

  2. [Email protected]:/tmp/pip-1.4.1$ cd PIP-1.4.1/

  3. [email protected]:/tmp/pip-1.4.1$ sudo python setup.py install

  4. [sudo] password for Dslab:

  5. Traceback (most recent):

  6. File "setup.py", line 5, <module>

  7. From Setuptools import Setup, find_packages

  8. Importerror:no module named Setuptools


When you install PIP, you are prompted to use the Setuptools module in setup.py, but the Setuptools software package is not installed on the computer, so we need to download and install the setuptools!


3. Installing the Setuptools package

You can open Setuptools's Python website first to see how the Setuptools package installs:


> wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py> python ez_setup.py--user


You can also download the Setuptools package after installation:

(1) Download Setuptools package
# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz
(2) Unzip the Setuptools bag
# tar zxvf setuptools-2.0.tar.gz
# CD setuptools-2.0
(3) Compiling setuptools
# python setup.py build
(4) Start to perform Setuptools installation
# python setup.py install


4. Install PIP again and install additional packages using PIP

Now that Setuptools is installed, we go into the pip-1.4.1 directory again and install the PIP using the "Python setup.py Install" command:

[Email protected]:/tmp$ CD PIP-1.4.1/
[Email protected]:/tmp/pip-1.4.1$ sudo python setup.py install
...

After the PIP is installed, we can install the other packages directly using PIP:


Final installation of our Paramiko

Pip Install Paramiko

Paramiko's official website: Https://github.com/paramiko/paramiko

If the following error occurs when installing Paramiko, follow the instructions for installing

command ' gcc ' failed with exit status 1

View plain <strong>[/pycrypto-2.0.1]$ sudo python setup.py build running build running build_py running Build_ext BU Ilding ' Crypto.Hash.MD2 ' extension gcc-pthread-fno-strict-aliasing-dndebug-o2-g-pipe-wall-wp,-d_fortify_source=2- fexceptions-fstack-protector--param=ssp-buffer-size=4-m64-mtune=generic-d_gnu_source-fpic-fpic-isrc/-I/usr/ Include/python2.4-c Src/md2.c-o BUILD/TEMP.LINUX-X86_64-2.4/SRC/MD2.O Unable to execute gcc:no such file or directory E Rror:command ' gcc ' failed with exit status 1</strong> solution 1:

May be missing Python-dev installation package causes

Workaround:

Centos

Yum-y Install python-dev*

Yum-y Install GCC

Finally, execute again:

Pip Install Paramiko

This article is from the "Crazy_sir" blog, make sure to keep this source http://douya.blog.51cto.com/6173221/1751619

Linux Installation Paramiko Module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.