0

I was trying to add a ppa using the command

sudo add-apt-repository ppa:nathan-renniewaldock/flux

I got the following error.

panda123@panda123:~$ sudo add-apt-repository ppa:nathan-renniewaldock/flux
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 11, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

When I ran ls -l /usr/lib/python3/dist-packages/apt_pkg*, I got the following output.

panda123@panda123:~$ ls -l /usr/lib/python3/dist-packages/apt_pkg*
lrwxrwxrwx 1 root root     39 Jul 27 18:47 /usr/lib/python3/dist-packages/apt_pkg.cpython-34m-x86_64-linux-gnu.so -> apt_pkg.cpython-35m-x86_64-linux-gnu.so
-rw-r--r-- 1 root root 310268 May 21 19:50 /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-i386-linux-gnu.so
lrwxrwxrwx 1 root root     39 Jul 27 18:49 /usr/lib/python3/dist-packages/apt_pkg.so -> apt_pkg.cpython-36m-x86_64-linux-gnu.so

running python -V gives me the following output

panda123@panda123:~$ python -V
Python 2.7.12

0 Answers0