Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to follow a guide to install some software on a ReadyNas Duo (sparc). The guide indicates I need python 2.7, but I already have 2.6 installed.

~# which python
/usr/bin/python

~# ls -al /usr/bin/python
lrwx--x--x    1 root     root            9 Jan  5  2012 /usr/bin/python -> python2.6

~# python
Python 2.6.6 (r266:84292, Mar 16 2011, 19:38:28)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2

Other applications I have installed depend on python 2.6, but I'm not sure if they are going to break if I move to 2.7

Is it possible to install 2.7 alongside 2.6 so they coexist? I assume that applications depend on the default python using /usr/bin/python symlink, so ideally 2.7 could sit in /usr/bin/python2.7 and the new application could just reference that directly?

share|improve this question
add comment

3 Answers

Instead of running make install at the end of the Python build process, run make altinstall instead. This will leave python alone and create python2.7 only.

share|improve this answer
    
Thanks Ignacio. Is the only thing different about altinstall the symlink? –  anger Jun 4 '13 at 13:30
add comment

You can manage your own version of Python using tools such as virtualenv or virtualenvwrapper and install the various packages you want into this "private installation", rather than try and co-exist with the pre-existing distro's Python.

share|improve this answer
add comment

It will not break anything. For example if I install Python 2.7 in a computer that already have Python 2.6, it will only create a link called python2.7 and it will not interfere in python2.6, because the way you access those two versions are different.

share|improve this answer
add comment

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.