ubuntu安装python 3.7.3

发布时间:2019-09-23 17:03:07编辑:auto阅读(1584)

    Step 1 – Prerequsiteis

    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
        libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev

    Step 2 – Download Python 3.7

    cd /usr/src
    sudo wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
    sudo tar xzf Python-3.7.3.tgz

    Step 3 – Compile Python Source

    cd Python-3.7.3
    sudo ./configure --enable-optimizations
    sudo make altinstall

    Step 4 – Check Python Version

    python3.7 -V

关键字