1

I have installed Matlab but when it installed I am not able to do anything with the terminal it is showing the following error:

~$ pip install flask
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'

enter image description here

hunter
  • 11

1 Answers1

1
sudo apt install --reinstall python3-apt

This reinstalls apt_pkg, and fixes the error of it not being present in /usr/lib/python3/dist-packages.

Edmund
  • 747