ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Ubuntu 16.04에서 파이썬 3.5.2 -> 3.7.0으로 업그레이드하기
    정보보안/리눅스 2019. 2. 1. 16:16
    # 출처: https://serverfault.com/questions/918335/best-way-to-run-python-3-7-on-ubuntu-16-04-which-comes-with-python-3-5
    # Install requirements
    sudo apt-get install -y build-essential
    sudo apt-get install -y checkinstall
    sudo apt-get install -y libreadline-gplv2-dev
    sudo apt-get install -y libncursesw5-dev
    sudo apt-get install -y libssl-dev
    sudo apt-get install -y libsqlite3-dev
    sudo apt-get install -y tk-dev
    sudo apt-get install -y libgdbm-dev
    sudo apt-get install -y libc6-dev
    sudo apt-get install -y libbz2-dev
    sudo apt-get install -y zlib1g-dev
    sudo apt-get install -y openssl
    sudo apt-get install -y libffi-dev
    sudo apt-get install -y python3-dev
    sudo apt-get install -y python3-setuptools
    sudo apt-get install -y wget
    
    # Prepare to build
    mkdir /tmp/Python37
    cd /tmp/Python37
    
    # Pull down Python 3.7, build, and install
    wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
    tar xvf Python-3.7.0.tar.xz
    cd /tmp/Python37/Python-3.7.0
    ./configure
    sudo make altinstall
    
    # 참고: https://stackoverflow.com/questions/41986507/unable-to-set-default-python-version-to-python3-in-ubuntu
    update-alternatives --install /usr/bin/python3 python /usr/local/bin/python3.7 10
    다 하고 나서 다시 버전을 확인하면...

    $ python3 -V

    Python 3.7.0


    휴..


    댓글

Designed by Tistory