centos7.5升級Python2.x至3.x

首先查看當前Python版本python

python  -V
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar -xf Python-3.6.5.tgz
cd Python-3.6.5/
./configure

此時可能會報錯,緣由是缺乏依賴包,根據提示執行以下:ide

yum install   gcc
make
make  install

此時可能還會報錯,緣由仍是缺乏依賴包,根據提示執行以下:code

yum -y install zlib*

再次安裝get

make  install

不出意外,升級成功!!!it

相關文章
相關標籤/搜索