I sudo deleted /usr/lib/python & /usr/lib/python3
Solution 1:
You could download the deb files from pkgs.org, open it with an archive manager and unpack the folders /usr/lib/python
and /usr/lib/python3
from those files.
You need libpython and libpython-stdlib For 64bit, python2.7 and ubuntu 18.04 this would be libpython and libpython-stdlib. For other versions you need to find the packages with pkgs.org as said earlier.
The debs contain a file called data.xz
. When installing, this file is unpacked. Go to usr/lib in that file. (In some archive managers ./usr/lib) From there you unpack the python folder to your /usr/lib and python should work again.