I am Debian user, and I want to install python-dev, but when I run the code in the shell as a root:
# aptitude install python-dev
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 28, in <module>
ImportError: No module named apt_pkg
Make sure you have a working python-apt package. You could try and remove and install that package again to fix the problem with apt_pkg.so not being located.
apt-get install python-apt