I have Ubuntu 12.04 and Python 3.2 installed. When I use sudo apt-get install python3
, it says that my python is 'already the newest version'. However, 3.4 is the latest.
How would I upgrade my current Python to 3.4?
As you noticed, Ubuntu 12.04 LTS ships with python3 3.2.3. If you need Python 3, then I suggest to upgrade to Ubuntu 14.04 LTS which includes python3 3.4.1.
If you cannot do that, consider something like virtualenv.
You can build from source. Download the tarball from the Python-site.
$tar xvf Python-4.3.1.tgz
$cd Python-4.3.1
$less README
And follow the instructions. You will then have two different installations of python so by just entering $python -v
you will invoke the old python version. This could be fixed by linking the new to your /etc/bin/python
or whatever it links to. First you need to remove the old link and create a new.
$rm /etc/bin/openssl
$ln -s [PATH TO NEW PYTHON] /etc/bin/openssl
Now the new Python should be invoked, check with:
$python -v