AnswerBun.com

No module named apt_pkg

elementary OS Asked by Fatih19 on October 31, 2020

Had this error while trying to install Lutris :sudo add-apt-repository ppa:lutris-team/lutris and then this came out :

 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 28, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Seems like the problem is something about python?

One Answer

It seems that you've upgraded python3 version. As explained here https://askubuntu.com/a/1191220/607679; because of the python3 update, usr/bin/python3 points to a python that does not have apt_pkg.

You can create symlink like below. This should your problem.

ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/apt_pkg.so

Answered by tyro on October 31, 2020

Add your own answers!

Related Questions

Can i add multiple docks?

1  Asked on August 28, 2021

     

Validity Fingerprint 138a:0090 reader

3  Asked on August 28, 2021 by jason-murphy

 

Select muliple files does not function

1  Asked on August 28, 2021 by josepablo

     

How to enable manual login?

1  Asked on August 28, 2021 by cng

         

What happened to the Applications Menu?

3  Asked on August 28, 2021 by christopher-collins

         

Lenovo touchpad does not work

1  Asked on February 25, 2021 by amir-2mi

     

Install hangs with gray rectangle accross screen

1  Asked on February 22, 2021 by user2777128

 

root login from GUI

2  Asked on February 15, 2021 by jung

   

elementary OS hangs a lot

0  Asked on February 12, 2021 by awais-mirza

       

Thunderbird update not available

0  Asked on February 10, 2021 by bigera

     

Can i install elementary OS without grub bootloader?

0  Asked on February 6, 2021 by quark405

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP