Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.2 installation on Ubuntu 12.04

I am trying to install python 3.2.3 on my ubuntu machine, which is 12.04, but I do not want to disturb the current 2.7 installation. After searching on the internet, I found a reference here. I followed the instructions, but when trying to run

sudo apt-get install build-essential libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev

I get an error saying that

E: Package 'libreadline5-dev' has no installation candidate.

What am I missing? Is there any other way to install python 3.2 on ubuntu? If I use apt-get, will it disturb the current installation?

like image 459
narlin Avatar asked Jul 31 '12 12:07

narlin


1 Answers

You can install as many Python versions as needed. A call to python from the shell will execute python2.7 (you can check that by executing ls -l /usr/bin/python), python 3.2 can be called also as python3.

If you have even more versions, these can be accessed directly with their numbers as python2.6 etc. I personally have versions 2.5, 2.6, 2.7 and 3.2 installed for compatibility reasons.

like image 158
emu Avatar answered Nov 15 '22 00:11

emu