"ModuleNotFoundError: No module named 'apt_pkg'" trying to install Moka

8,788

See zhazha's answer on python-dev installation error: ImportError: No module named apt_pkg - Stack Overflow for a solution. In short:

cd /usr/lib/python3/dist-packages
sudo ln -s apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so
Share:
8,788

Related videos on Youtube

ParisaN
Author by

ParisaN

Updated on September 18, 2022

Comments

  • ParisaN
    ParisaN almost 2 years

    I wanna install moka theme on my ubuntu with following command:

    sudo add-apt-repository ppa:moka/stable
    

    But get error:

    Original exception was:
    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'
    

    python -V: 2.7.6

    python3 -V: 3.6.3

    What should I do?