标签:python3.7 tps lib enc efi inux fence gcc 变量
你要安装python的目录
cd /opt
工作中大部分安装在/opt
在安装目录下下载python3.7.2
sudo wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2rc1.tgz
安装依赖
yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
解压源码包
tar -zxvf Python-3.7.2rc1/
进入解压后的文件夹
cd Python-3.7.2rc1/
调用 Python-3.7.2rc1路径底下的configure脚本文件
make
make install //此时会生成python37文件夹,python3.7.2就是安装在这了
修改全局变量
vim /etc/profile
?
PATH=/opt/python37/bin:/opt/python36/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
标签:python3.7 tps lib enc efi inux fence gcc 变量
原文地址:https://www.cnblogs.com/babyjoy/p/10634162.html