Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink.

When trying to do “do-release-upgrade” from current Ubuntu 18.04 to new 19.04 I am getting error

"Your python3 install is corrupted. Please fix the ‘/usr/bin/python3’ symlink "

I currently have python 2.7, 3, 3.6 and 3.7 installed.

Please advise what shall i try. Thanks

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

i had the same problem with my python3 installation because i installed an alternative version. the default that came with ubuntu 18.04 was python3.6 and i had installed 3.7 & 3.8 and when ever i wanted to switch to the specific version i would use use update-alternative command. the issue with process is that it alters the default python3 simlink to point to the alternative installation path from




and the system expects that the first not the second even the terminal wouldn’t work so to restore to the default,

  • remove alternative python installation (optional) but pointless to keep one when ubuntu 20.04 uses later version of python3
sudo update-alternative --remove python3 {/path/to/python3.7}
  • restore the old (defulat) symlink of python3
sudo rm -rf /usr/bin/python3 && sudo ln -s /usr/bin/python3.6 /usr/bin/python3

and after that if you check your python3 symlink path

ls -la /usr/bin/python3.6

and it should point to the old (default) /usr/bin/python3.6

good luck and hope this helps.

Any update? I have manually install python2.7 and python3.7 after deleting the executable accidentally.

==> which python
==> l python
lrwxrwxrwx 1 root root 24 May 22 00:47 python -> /usr/local/bin/python2.7
==> l python*
lrwxrwxrwx 1 root root 24 May 22 00:47 python -> /usr/local/bin/python2.7
lrwxrwxrwx 1 root root 22 May 22 00:47 python3 -> /usr/local/bin/python3
==> python --version
Python 3.7.4
==> lsb_release -a
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 25, in <module>
    import lsb_release
ModuleNotFoundError: No module named 'lsb_release'
==> sudo do-release-upgrade
Traceback (most recent call last):
  File "/usr/bin/do-release-upgrade", line 8, in <module>
    from DistUpgrade.DistUpgradeVersion import VERSION
ModuleNotFoundError: No module named 'DistUpgrade'

Seems i have done something to python. Now when i try sudo apt upgrade ,

i get

Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)```