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

Simple screen recorder(ssr) no funciona audio interno

0  Asked on February 5, 2021 by yeacomono

     

Intermitent sound after update

0  Asked on January 31, 2021 by eric-wheeler

 

Windows Boot Manager loops back to GRUB

1  Asked on January 26, 2021 by rogier1975

     

Cannot install or try live elementary OS

1  Asked on January 25, 2021 by macbart

 

Keyboard layout switch in different windows

1  Asked on January 18, 2021 by user20370

   

How can I see the thumbnails videos?

0  Asked on January 14, 2021 by youngchock

 

Camera has black screen on thinkpad e545

0  Asked on January 14, 2021 by alan-armbrust

 

Elemenntary OS Wingpanel not loading

0  Asked on January 10, 2021 by flyiinhigh

   

Surface Laptop 1st Gen No Keyboard

0  Asked on January 2, 2021 by frog

     

My VLC player doesn’t have minimize button

6  Asked on December 26, 2020 by rafif-elfazri

   

Inquiry for Tablet PC OS

0  Asked on December 16, 2020 by edward-park

 

Change resolution when running in Hyper-V

1  Asked on December 12, 2020 by dekay

   

Problems in mounting external disks for wine and virtualbox

1  Asked on December 11, 2020 by francois-bonin

 

Wi-Fi stopped working after recent updates

0  Asked on December 8, 2020 by scrollwheelie

   

Configuring the wing panel

2  Asked on December 6, 2020 by juergen-leo-von-staerk

     

Ask a Question

Get help from others!

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