How to download and use python on ubuntu?

I recently purchased a laptop with system 76, this is my first acquaintance with ubuntu os. The terminal says that I currently have version 2.7.5+ (im not sure what the plus means).

My first question is: how do I actually use python on this computer, since it does not come from idle time, and my second question is: how to download the latest version 3.3.4, which can be found here: http://python.org/download /releases/3.3.4/ ?

+6
source share
3 answers

Python update (or any package)

$ sudo apt-get update $ sudo apt-get upgrade python 

Using Python

 $ python Python 2.7.4 (default, Sep 26 2013, 03:20:26) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "bacon" bacon >>> 
+4
source

To start, open the console window.

To install Python 3:

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

To install IDLE:

 sudo apt-get install idle3 

Keep in mind that you can also open a terminal window and just type python to be thrown into the python console. Maybe Python 3 should be forced using python3 if apt decided not to overwrite your system by default 2.7.5.

There are other environments like IDLE that can be much nicer to use. One such example is a plugin for a Sublime Text text editor called SublimeREPL (A REPL is Read Evaluate Print Loop is essentially a python interactive hint). These REPLs are available for many interpreted languages ​​and can be very convenient if you write code.

Here's what it looks like when installing my OS:

SublimeREPL with Python 3.3

+2
source

If you want python 3, you need to run:

 sudo apt-get -y install python3.3 

If you have an older Ubuntu distribution, you can download gz and compile it. This shows an example of how to do this: https://askubuntu.com/questions/244544/how-to-install-python-3-3

+1
source

All Articles