Update-alternatives

From RHS Wiki
Revision as of 14:39, 11 December 2017 by Rafahsolis (talk | contribs) (Created page with "Using update-alternatives to have multiple python choices: List available python binarys: $ ls /usr/bin/python* List available update-alternatives --config python <nowiki>#...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using update-alternatives to have multiple python choices: List available python binarys:

$ ls /usr/bin/python*

List available update-alternatives --config python

# update-alternatives --list python
update-alternatives: error: no alternatives for python

If you see this error you need to register alternatives

# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2

The higest number will have more priority

update-alternatives --config python

Remove alternatives with:

# update-alternatives --remove python /usr/bin/python2.7