2021-10-09 16:45:50

centos6.8 install python3.6

自动的python2.6 安装的supervisor 实在是没法用。

没办法升级下python.

升级过程如下。

安装依赖

sudo yum install openssl-devel -y

安装python3.6

//1. 安装 wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz tar zxvf Python-3.6.0.tgz cd Python-3.6.0 ./configure --prefix=/usr/local/python3.6 --with-ssl make make install // 2.创建链接来使系统默认python变为新版本 sudo ln -fs /usr/local/python3.6/bin/python3 /usr/bin/python // 检查Python版本 python –V // 3.修改yum配置(否则yum无法正常运行) vi /usr/bin/yum 将第一行的#!/usr/bin/python修改为系统原有的python版本地址#!/usr/bin/python2.6

安装supervisor

# 需要把/usr/local/python3.6/bin 加入到path路径下 pip3 install --upgrade pip # pip install supervisor echo_supervisord_conf > /etc/supervisord.conf supervisord -c /etc/supervisord.conf

本文链接:http://blog.go2live.cn/post/centos68-py3.html

-- EOF --