How to Install Python 3.6.0 on Ubuntu

Python is an open source, portable, free, customization, effective and modern programming language that offers a wide range of attractive functionality and allows application developers to create software projects that are fully compatible with all mainstream operating systems. This article helps you to install Python 3.6.0 on Ubuntu.

See Also:

  • Install Python 3.5.1 on CentOS/RHEL 7/6
  • Python 3.6.0

    Step #1 Install Required Packages

    Use the following command to install required packages.

    $ 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
    

    Step #2 Download Python 3.6.0

    You can download the python from official site. You can also download latest version using the below command.

    $ cd /opt
    $ wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
    

    Now extract the downloaded package.

    $ sudo tar xzf Python-3.6.0.tgz
    

    Step #3 Install Python using Source Code

    Now use below commands to compile python source code on your system.

    $ cd Python-3.6.0
    $ sudo ./configure
    $ sudo make altinstall
    

    Note: make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

    Step #4 Check the Python Version

    Finally, you have successfully installed Python 3.6 on your system. Now you can check the version using below command.

    # python3.6 -V
    
    Python 3.6.0
    

    Enjoy it!

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

    The reCAPTCHA verification period has expired. Please reload the page.