linux系统是一个应用非常广泛的系统,raksmart服务器也是支持linux系统的。那么今天小编给大家带来一篇怎么在linux系统下安装python3.6。
美国服务器1.首先是安装依赖环境
最小化安装redhat6.4环境下
yum -y install gcc make zlib-devel bzip2-devel ncurses-devel readline-devel
(yum -y install gcc make zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel db4-devel gdbm-devel libpcap-devel xz-devel)
2.mkdir -p /usr/local/python3.6
3.编译安装
tar -zxvf python-3.6.2.tgz
cd python-3.6.2
./configure --prefix=/usr/local/python3.6
make
make install
4.设置python3.6为默认python命令,并设置yum的配置
cd /usr/bin
mv python pythonold
vi yum
将#!/usr/bin/pythono改成#!/usr/bin/pythonold
ln -s /usr/local/python3.6/bin/python3.6 python
如此就能轻松的4步完成python3.6的安装,希望能够帮助到有需要的朋友。