美文网首页
python ubuntu16.04 python3.7

python ubuntu16.04 python3.7

作者: xun2019 | 来源:发表于2019-07-24 11:50 被阅读0次
    sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev 
    libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev 
    liblzma-dev libffi-dev libc6-dev
    
    wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
    tar zxvf Python-3.7.4.tgz
    
    cd Python-3.7.4/
    
    sudo mkdir -p /usr/local/python3
    ./configure --prefix=/usr/local/python3  --enable-optimizations
    make
    sudo make install
    
    which python3
    which pip3
    rm -rf /usr/bin/python3
    rm -rf /usr/bin/pip3
    
    #添加python3的软链接
    ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
    #添加 pip3 的软链接
    ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3
    
    python3 -V
    pip3 -V
    
    

    subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.

    解决方法
    find / -name lsb_release
    rm -rf /usr/bin/lsb_release


    相关文章

      网友评论

          本文标题:python ubuntu16.04 python3.7

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