1. 程式人生 > >Linux 原始碼安裝 Python3

Linux 原始碼安裝 Python3

 

From:https://www.cnblogs.com/Mrhuangrui/p/7722531.html

 

  1. 下載原始碼包
    https://www.python.org/downloads/
  2. 解壓(以3.64版本為例)
    wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
    tar -zxvf Python-3.6.4.tgz
    cd Python-3.6.4
  3. 安裝
    ./configure --prefix=/usr/local/python3
    make && make install 
  4. 新增軟連結
    ln -s /usr/local/python3/bin/python3 /usr/bin/python3
  5. 安裝第三方庫
    yum install python-pip  
    pip install --upgrade pip
    python3 -m pip freeze
    python3 -m pip install redis
    python3 -m pip install pymongo
    python3 -m pip install pymysql
    python3 -m pip install configparser
    豆瓣源:
    pip Install:pip install -i https://pypi.douban.com/simple/