Archives For November 30, 1999

free python ide

This quick tutorial is going to show you how to install Python 3.3.5 (or 3.4.0) and set as default in Ubuntu 14.04 and Ubuntu 12.04.

Python 3.3.5 was released on March 9th, 2014. It fixed:

  • a 3.3.4 regression in zipimport
  • a 3.3.4 regression executing scripts with a coding declared and Windows newlines
  • potential DOS using compression codecs in bytes.decode()

Python 3.4.0 was released one week later than 3.3.5 with below new features:

  • a “pathlib” module providing object-oriented filesystem paths
  • a standardized “enum” module
  • a build enhancement that will help generate introspection information for builtins
  • improved semantics for object finalization
  • adding single-dispatch generic functions to the standard library
  • a new C API for implementing custom memory allocators
  • changing file descriptors to not be inherited by default in subprocesses
  • a new “statistics” module
  • standardizing module metadata for Python’s module import system
  • a bundled installer for the pip package manager
  • a new “tracemalloc” module for tracing Python memory allocations
  • a new hash algorithm for Python strings and binary data
  • a new and improved protocol for pickled objects
  • a new “asyncio” module, a new framework for asynchronous I/O

Install:

A third party launchpad PPA contains older and newer Python version for Ubuntu. The two Python releases are available in the PPA for Ubuntu 14.04 and Ubuntu 12.04.

To add the PPA, press Ctrl+Alt+T on keyboard to open the terminal and run:

sudo add-apt-repository ppa:fkrull/deadsnakes

You may read the PPA description in the output and then:

Install Python 3.3.5 via:

sudo apt-get update; sudo apt-get install python3.3

Or install python 3.4.0 via:

sudo apt-get update; sudo apt-get install python3.4

To set your installed python as default, run the below commands one by one (You may change python3.3 to python3.4 in the code):

rm /usr/local/bin/python  

ln -s /usr/local/bin/python3.3 /usr/local/bin/python

This tutorial shows how to install older & newer versions of python in Ubuntu. Felix Krull has created a PPA that contains multiple python versions:

  • python 2.4.6 for Ubuntu 10.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04, Ubuntu 11.10, Ubuntu 11.04
  • python 2.5.6 for Ubuntu 10.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04, Ubuntu 11.10, Ubuntu 11.04
  • python 2.6.8 for Ubuntu 13.04, Ubuntu 12.04, Ubuntu 12.10
  • python 2.7 for Ubuntu 10.04, Ubuntu 10.10
  • python 3.1 for Ubuntu 13.04, Ubuntu 12.10, Ubuntu 12.04, Ubuntu 11.10
  • python 3.2 for Ubuntu 13.04, Ubuntu 10.04
  • python 3.3 for Ubuntu 12.04, Ubuntu 11.10, Ubuntu 10.04

To add the ppa, run below command in terminal:

sudo add-apt-repository ppa:fkrull/deadsnakes

Then update package lists:

sudo apt-get update

To install python 2.4 in Ubuntu 12.04, etc. run below command:

sudo apt-get install python2.4

To install python 2.5 in Ubuntu 12.04, etc. run:

sudo apt-get install python2.5

To install python 2.6 in Ubuntu 12.10, Ubuntu 12.04, run:

sudo apt-get install python2.6

To install python 2.7 in Ubuntu 10.04, Ubuntu 10.10

sudo apt-get install python2.7

To install Python 3.2 in Ubuntu 12.04:

sudo apt-get install python3.2

To install Python 3.3 in Ubuntu 12.04:

sudo apt-get install python3.3