Linux-python环境编译

编译

  • 优点:可以自定义功能
  • 缺点:安装比较耗时
yum install zlib-devel

wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz

tar xf Python-3.6.8.tar.xz

cd Python-3.6.8

./configure --prefix=/opt/python36  检查环节预处理

make 释放makefile文件

make install 安装

错误整理

configure: error: in `/root/test/Python-3.6.8':
configure: error: no acceptable C compiler found in $PATH
yum install gcc

添加环节变量

vim /etc/profile.d/python.sh

PATH=$PATH:/opt/python36/bin

posted @ 2020-06-04 23:34  Hedger_Lee  阅读(162)  评论(0编辑  收藏  举报