centos7怎么安装python3.6
1个回答
展开全部
1. 安装依赖包:
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
2. 下载py安装包:
wget /ftp/python/3.6.0/Python-3.6.0.tgz
3.解压:
tar -zxvf Python-3.6.0.tgz
4.指定目录安装:
./configure --prefix=/usr/py/py3.6
make
make install
5.修改连接:
ln -s /usr/py/py3.6/bin/python3 /usr/bin/python
6.修改yum配置:
vi /usr/bin/yum
vi /usr/libexec/urlgrabber-ext-down
把文件头部的#!/usr/bin/python改成#!/usr/bin/python2.7保存退出即可
7.修改pip工具:
ln -s /usr/py/py3.6/bin/pip3.6 /usr/bin/pip
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
2. 下载py安装包:
wget /ftp/python/3.6.0/Python-3.6.0.tgz
3.解压:
tar -zxvf Python-3.6.0.tgz
4.指定目录安装:
./configure --prefix=/usr/py/py3.6
make
make install
5.修改连接:
ln -s /usr/py/py3.6/bin/python3 /usr/bin/python
6.修改yum配置:
vi /usr/bin/yum
vi /usr/libexec/urlgrabber-ext-down
把文件头部的#!/usr/bin/python改成#!/usr/bin/python2.7保存退出即可
7.修改pip工具:
ln -s /usr/py/py3.6/bin/pip3.6 /usr/bin/pip
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询