centos6安装python3

Centos6 安装python3
一:
1.下载安装包:wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
2.解压xz -d Python-3.6.5.tar.xz
tar xvf Python-3.6.5.tar

3.配置编译安装
cd Python-3.6.5
./configure --prefix=/usr/local
make && make install

如果报错:先执行 yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel

4.安装pip3和easy_install
# 下载setuptools,easy_install 的安装包
wget https://bootstrap.pypa.io/ez_setup.py

#安装easy_install
#记得用python3安装
python3 ez_setup.py

#安装完成后/usr/local/bin/目录下出现easy_install
#安装pip3
easy_install-3.6 pip

#安装完成后/usr/local/bin/目录下出现pip3.6
#升级pip3.6版本
pip3 install --upgrade pip

posted @ 2018-10-26 08:58  jaysonzxk  阅读(414)  评论(0编辑  收藏  举报