Ubuntu 20.04, have broken python3, can it be fixed?


Realise this is a common problem, all my fault. now have in /usr/bin

/usr/bin/python3 -> /python3.8       (in red)
/usr/bin/pyenve -> pyvenv-3.8        (in red)

no amount of fiddling with apt or synaptice et. al seems to fix it. Is there a way to reinstall default python 3.8 and get this working outwith a full reinstall? Thx. J

---------------Answer---------------

To avoid the issue in the future, you can use python virtual environments for your coding and leave the ubuntu system stuff alone.

You will have your own python environment, used only by you, fully under your control, and you will know what's happening with it at all times. Instead of the system possibly updating the modules you are trying to use in your code.

  • https://python.land/virtual-environments/virtualenv
  • https://docs.python.org/3/library/venv.html

Previous : First time using Virtualbox, first time installing Lubuntu, stuck at Partitions page
Next : Network Manager in ubuntu 18.04 crashes and I've to reboot everytime