1

I've just installed manually python3.3 sources on the directory : /opt/python3.3 on my laptop which contains python2.6 as default installation. But now i need to make the python3.3 as the default one and execute some commands as it said in this post : stackoverflow

how can i do that ? thank you

1 Answer 1

0

Since you have installed from source, you are pretty much on your own.

You can do something like creating ~/bin/python symlink from your home directory to /opt/python-3.3/bin/python, and then adding $HOME/bin to PATH in your .bashrc.

Or, you can add /opt/python-3.3/bin to your PATH instead.

But, in both of these cases, you will not be able to use standard package manager to install Python extensions - these are only provided for Python installed as standard Ubuntu package.

4
  • thank you. I installed it from source because when I try to execute : sudo apt-get install python3.1 it gives me 404 Not Found [IP : 91.189.91.13 80]
    – Mehdi
    Feb 4, 2013 at 11:22
  • I assume that you have Ubuntu 12.10. Note that Ubuntu 12.10 has Python 3.2.3 by default - is this not good enough for you already? But it is called python3 (python points to Python 2.7). Maybe this is the reason why does not want to go down to 3.1.
    – mvp
    Feb 4, 2013 at 11:31
  • no, I only have ubuntu 10.10
    – Mehdi
    Feb 4, 2013 at 11:35
  • you can try adding backports repo to get some of the newer packages. But, 10.10 was not LTS, and is already removed from official repository list. You may try using Lucid python3, but this is going to be hit or miss. You might want to actually upgrade your Ubuntu...
    – mvp
    Feb 4, 2013 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .