1. 程式人生 > >centos6.4下安裝python3.6.1

centos6.4下安裝python3.6.1

編譯 www logs strong file config pro 6.4 tps

1、安裝編譯環境所需包

#yum install zlib-devel bzip2-devel openssl-devel ncurese-devel gcc zlib

技術分享

安裝成功

技術分享

2.下載源碼包

  #wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

3.安裝
  解壓源碼包進入到解壓完的python源碼包目錄下
  #tar zxvf Python-3.6.1.tgz
  #cd Python-3.6.1

4.編譯安裝
  #./configure --prefix=/usr/local/python3

  #make

技術分享

  #make install

技術分享

技術分享

5.添加環境變量

  #vim /etc/profile

  添加 export PATH="$PATH:/usr/local/python3/bin"

技術分享

重啟一下,就可以使用了

技術分享

centos6.4下安裝python3.6.1