[Ubuntu] HowTo : Install python with apt-get
21 01 2008Some day ago, I was talking with a friend about python. I’d like to learn it, but I did not time in the past. I had ten “free” minutes and I opened my shell and install it. What do you do to install? It’s very simple …
You can “only” follow me with a shell ![]()
Step 0 -> Update repository package lists
innovatel@silente:~$ sudo apt-get update
Step 1 -> Install python
innovatel@silente:~$ sudo apt-get install python
If python is already present on your system, you read the follow message:
innovatel@silente:~$ sudo apt-get install python
Reading package lists… Done
Building dependency tree
Reading state information… Done
python is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Step 2 -> You “must” try it
Now, we create a file “HelloWorld.py” with a text editor. I’m using nano, I love this!
innovatel@silente:~$ nano -w HelloWorld.py
and we write:
print “Hello, World!”
Now, we can save and exit from this file. It’s the moment of the true …
innovatel@silente:~$ python HelloWorld.py
Hello, World!
Oh yes, It’s run … percfet!
Step 3 -> Do you want some documentation or example?
If you don’t want, you can skip this step! It’s not a problem for me ![]()
innovatel@silente:~$ apt-cache search python-doc
libapache2-mod-python-doc - Apache 2 module that embeds Python within the server
python-doc - Documentation for the high-level object-oriented language Python
python-docutils - Utilities for the documentation of Python modules
python-gtk2-tutorial - tutorial for the GTK2 python library
python-roman - A module for generating/analyzing Roman numerals
python-biopython-doc - Documentation for the Biopython library
I’m going to install only the package python-doc. And, where are the examples?
innovatel@silente:~$ apt-cache search python-examples
python-examples - Examples for the Python language (default version)
Are you ready to install? Of course, I’m ready!
innovatel@silente:~$ sudo apt-get install python-examples python-doc
Step 4 -> Do you want a python GUI Editor?
If you don’t want, you can skip this step! It’s not a problem for me ![]()
innovatel@silente:~$ sudo apt-get install eric
Step 5 -> Do you want some “python links”?
Python Programming Language — Official Website
[...] Io l’ho aperto qualche volta per curiosità e provare a scrivere il semplice "Hello Word!" in python e non mi è dispiacito. Ricordo anche che avevo scritto una guida di installazione in merito. Per chi fosse interessato, può trovarla nel seguente articolo: [Ubuntu] HowTo : Install python with apt-get [...]