centos 6 pythonとpipをインストール

1752 ワード

インストール依存
yum groupinstall -y Development tools
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

Pythonのインストール
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
xz -d Python-3.5.2.tar.xz
tar xvf Python-3.5.2.tar

cd Python-3.5.2
./configure --prefix=/usr/local
make && make install && echo OK

インストールpip
#   setuptools,easy_install     
wget https://bootstrap.pypa.io/ez_setup.py

#  easy_install-3.5
python3.5 ez_setup.py

#     /usr/local/bin/     easy_install-3.5

#  pip3.5
easy_install-3.5 pip

#     /usr/local/bin/     pip3.5

#  pip3.5  
pip3.5 install --upgrade pip