If you install newer version of python and change the original python3 symbolic link to the newer version then many of your ubuntu default systems stops working. A solution for this is to change the symbolic link back to the default version of the ubuntu release.
rm /usr/bin/python3
ln -s /usr/bin/python3.6 /usr/bin/python3
These commands does the job for ubuntu 18.04 LTS