Centos6.6安裝Python3.5筆錄

一、CentOS6.6 安裝Python3.5 的依賴包

  yum groupinstall "Development tools"
  yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-develpython

二、下載Python3.5的源碼包並編譯

  wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
  tar -zxvf Python-3.5.1.tgz
  cd Python-3.5.1
  ./configure --prefix=/usr/local --enable-shared
  make
  make install
  ln –s /usr/local/bin/python3 /usr/bin/python3sql

三、在運行Python以前須要配置庫:

  echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf
  ldconfigsqlite

四、運行演示:

  python3 --version
  Python 3.5.1ip

五、CentOS6安裝pip的方法

  wget https://pypi.python.org/packages/source/p/pip/pip-8.1.0.tar.gz#md5=e9c3844db343f47d16040b32ad9072bemd5

  注意:wget獲取https的時候要加上:--no-check-certificatessl

  tar -zxvf pip-8.1.0.tar.gz#解壓文件 get

  cd pip-8.1.0.tar.gz/ 源碼

  python3 setup.py installopenssl

  OK,這樣就安裝好pip了。it

相關文章
相關標籤/搜索