I had some issues when installing a newer version of python on my ubuntu installation. Having downloaded a few different versions i then changed some soft links including repointing python to the 3.8 version as well as pip to pip3.
Now my issue is that when ever i type something that normally I would get an apt suggestion for or expect to a command not found error i now get a python error
Example from working VM which i didnt mess with
ubuntu@vps-f116ed9f:/usr/bin$ wer
Command 'wer' not found, did you mean:
command 'we' from deb xwpe (1.5.30a-2.1build3)
command 'ner' from deb frog (0.15-1build2)
Try: sudo apt install <deb name>
ubuntu@vps-f116ed9f:/usr/bin$ lskdflskdf
lskdflskdf: command not found
Example from the VM i changed python and softlink
myuser@myhost:/usr/bin$ wer
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
myuser@myhost:/usr/bin$ lkjsdfkljsdf
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Does anyone know what i can do to fix it so that i will get apt suggestions or "command not found" messages again?