畢竟豐富的第三方庫是python的優點所在,爲了更加方便的安裝第三方庫,使用pip命令,咱們須要進行相應的安裝。python
一、安裝pip前須要前置安裝setuptoolslinux
命令以下:post
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26 tar -zxvf setuptools-19.6.tar.gz cd setuptools-19.6 python3 setup.py build python3 setup.py install
若是前面沒佈置好環境的話,就要苦逼一下了:ui
報錯: RuntimeError: Compression requires the (missing) zlib moduleblog
咱們須要在linux中安裝zlib-devel包,進行支持。ip
yum install zlib-devel
須要對python3.5進行從新編譯安裝。md5
cd python3.6.1 make && make install
又是漫長的編譯安裝過程。ssl
從新安裝setuptoolsget
python3 setup.py build python3 setup.py install
二、安裝pipopenssl
命令以下:
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb tar -zxvf pip-8.0.2.tar.gz cd pip-8.0.2 python3 setup.py build python3 setup.py install 若是沒有意外的話,pip安裝完成。
若是沒有搞好環境的話,會遇見親切的報錯:
pip3 install paramiko
報這個錯
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
而後開始進行以下操做
yum install openssl yum install openssl-devel cd python3.6.1 make && make install