Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Feb 6 '13 at 4:16

This question came from our site for professional and enthusiast programmers.

1 Answer 1

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.

share|improve this answer
    
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 '13 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 '13 at 11:31
    
no, I only have ubuntu 10.10 –  Mehdi Feb 4 '13 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 '13 at 11:41
    
ok thank you :) –  Mehdi Feb 4 '13 at 16:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.