Skip to content

Instantly share code, notes, and snippets.

@barbietunnie
Created September 1, 2024 19:23
Show Gist options
  • Save barbietunnie/df058a3e59a219f7cbc4416eb0e866c8 to your computer and use it in GitHub Desktop.
Save barbietunnie/df058a3e59a219f7cbc4416eb0e866c8 to your computer and use it in GitHub Desktop.
Unable to install or update any libraries ModuleNotFoundError: No module named 'apt_pkg'

How to resolve the error "Unable to install or update any libraries ModuleNotFoundError: No module named 'apt_pkg'" on Ubuntu

The issue can be resolved by uninstalling and installing the python3-apt package

sudo apt remove python3-apt

sudo apt install python3-apt

Credits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment