centos上安装 Python3.xx
下载源码包
wgetwgethttps://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.gz
2. 安装依赖
yuminstall-yopenssl-develbzip2-develexpat-develgdbm-develreadline-develsqlite-devel
3. 安装
tarzxfPython-3.6.1.tar.gz cdPython-3.6.1 ./configure--prefix=/usr/local/python3 make makeinstall
4. 设置环境变量,方便使用
#进入python解析器 ln-s/usr/local/python3/bin/python3/usr/bin/python3 #pip安装包工具 ln-s/usr/local/python3/bin/pip3/usr/bin/pip3
安装完成,可以使用了