美文网首页
Ubuntu 16.04安装Python 3.6

Ubuntu 16.04安装Python 3.6

作者: 龜山島 | 来源:发表于2017-11-11 21:57 被阅读0次

    1: 从源码安装Python 3.6

    官方正式版为Python 3.6.3

    cd /opt
    wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
    tar -xvf Python-3.6.3.tgz
    cd Python-3.6.3
    ./configure
    make 
    make install
    

    如果有以下错误信息,安装zlib1g-dev
    zipimport.ZipImportError: can't decompress data; zlib not available

    apt-get install zlib1g-dev
    
    # python3.6 -V
    Python 3.6.3
    

    2: 从PPA安装 Python 3.6

    添加PPA源

    # apt-get install software-properties-common python-software-properties
    # add-apt-repository ppa:jonathonf/python-3.6
    Press [ENTER] to continue or ctrl-c to cancel adding it
    

    安装Python 3.6

    # apt-get update
    # apt-get install python3.6
    # python3.6 -V
    Python 3.6.3
    

    To learn more about Python version 3.6 check their official release notes.

    相关文章

      网友评论

          本文标题:Ubuntu 16.04安装Python 3.6

          本文链接:https://www.haomeiwen.com/subject/kipgmxtx.html