edsheut

Making Python 3 default in Debian

Oct 13th, 2020 (edited)
1,860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. pi@raspberrypi:~ $ sudo apt install python3 idle3
  2. pi@raspberrypi:~ $ python --version
  3. Python 2.7.16
  4. pi@raspberrypi:~ $ update-alternatives --list python
  5. update-alternatives: error: no alternatives for python
  6. pi@raspberrypi:~ $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
  7. update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
  8. pi@raspberrypi:~ $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
  9. update-alternatives: using /usr/bin/python3.7 to provide /usr/bin/python (python) in auto mode
  10. pi@raspberrypi:~ $ update-alternatives --list python
  11. /usr/bin/python2.7
  12. /usr/bin/python3.7
  13. pi@raspberrypi:~ $ python --version
  14. Python 3.7.3
  15. pi@raspberrypi:~ $
Add Comment
Please, Sign In to add comment