4

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?

4

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.

  • Thanks Ignacio. Is the only thing different about altinstall the symlink? – anger Jun 4 '13 at 13:30
1

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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