Centos7 Python3.x源碼安裝
阿新 • • 發佈:2019-03-25
all gin 源碼安裝 4.0 evel 優化 cap wget --
第一步,安裝開發工具集
yum -y groupinstall "Development tools"
第二步,安裝相關依賴包:
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
第三步,下載Python源碼包,解壓:
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
tar -xvJf Python-3.6.2.tar.xz
第五步,編譯:
cd Python-3.6.2 && ./configure --enable-optimizations # 進行配置優化
make && make install
第七步,創建軟連接:
ln -s /usr/local/bin/python3 /usr/bin/python3
ln -s /usr/local/bin/pip3 /usr/bin/pip3
Centos7 Python3.x源碼安裝