How To Install Python 3.6.1 On Ubuntu

How to install Python 3.6.1 in Ubuntu 16.04. Python 3.6.1 is now the latest maintenance release of Python 3.6 and supersedes 3.6.0. Python is a widely used high-level programming language for general-purpose programming.

Python 3.6 series comes with new syntax features, such as:

  • PEP 498, formatted string literals.
  • PEP 515, underscores in numeric literals.
  • PEP 526, syntax for variable annotations.
  • PEP 525, asynchronous generators.
  • PEP 530: asynchronous comprehensions.

Significant improvements in the standard library:

  • The asyncio module has received new features, significant usability and performance improvements, and a fair amount of bug fixes. Starting with Python 3.6 the asyncio module is no longer provisional and its API is considered stable.
  • A new file system path protocol has been implemented to support path-like objects. All standard library functions operating on paths have been updated to work with the new protocol.
  • The datetime module has gained support for Local Time Disambiguation.
  • The typing module received a number of improvements.
  • The tracemalloc module has been significantly reworked and is now used to provide better output for ResourceWarning as well as provide better diagnostics for memory allocation errors. See the PYTHONMALLOC section for more information.

Major new features of the 3.6 series, compared to 3.5

Among the new major new features in Python 3.6 are:

  • PEP 468, Preserving Keyword Argument Order
  • PEP 487, Simpler customization of class creation
  • PEP 495, Local Time Disambiguation
  • PEP 498, Literal String Formatting
  • PEP 506, Adding A Secrets Module To The Standard Library
  • PEP 509, Add a private version to dict
  • PEP 515, Underscores in Numeric Literals
  • PEP 519, Adding a file system path protocol
  • PEP 520, Preserving Class Attribute Definition Order
  • PEP 523, Adding a frame evaluation API to CPython
  • PEP 524, Make os.urandom() blocking on Linux (during system startup)
  • PEP 525, Asynchronous Generators (provisional)
  • PEP 526, Syntax for Variable Annotations (provisional)
  • PEP 528, Change Windows console encoding to UTF-8
  • PEP 529, Change Windows filesystem encoding to UTF-8
  • PEP 530, Asynchronous Comprehensions

Install Python 3.6.1 in Ubuntu 16.04

Run the following commands in Terminal to install Python 3.6.1 in Ubuntu 16.04:

sudo apt-get update
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

The PPA description says that it’s a plain backport of *just* Python 3.6. System extensions/Python libraries may or may not work. Don’t remove Python 3.5 from your system – it will break.

Please note that after installing Python 3.6, you will have to direct the system to use python 3.6 instead of the default 3.5:

sudo apt-get update
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

How To Install Python 3.6.1 On Ubuntu originally posted on Source Digit – Latest Technology, Gadgets & Gizmos.