0

I would like to upgrade my python3 version from 3.2.3 to 3.3.x version. I am using Ubuntu 12.04

Referred this link. Is it the same procedure to upgrade the python version?

If so, then what must be run instead of sudo apt-get build-dep python3.4?

I have a doubt in the procedure because it is updating in same version line 3.4.x. Please refer and say so as to avoid further problems.

Edit 1: Also referred this link How do I install python 3.3 but did not help me.

anand mbs
  • 431

1 Answers1

3

While relatively little in 12.04's core system relies on Python 3, I would always and in the strongest terms recommend that you leave the default Python environments to themselves.

That is to say:

  • Don't mess with the /usr/bin/python{,2,3} etc links.
  • Don't sudo {pip install,easy_install} anything into the system's site packages.

This is contrary to what you say you want to do but seriously, given you don't already know how to do this, you're a very long way away from knowing how to fix a broken system.

In your case, I'd recommend compiling your version of Python (in your home directory or even in /opt/) and then creating a virtualenv (venv) from that. Inside the virtualenv, python (and everything that uses it) will refer to the version of Python used during the creation of that environment.

cd project_directory
/path/to/python -m venv venv
. venv/bin/activate
pip install whatever
Oli
  • 299,380