How to fix 'ModuleNotFoundError: No module named 'apt_pkg'?

前端 未结 4 1665
眼角桃花
眼角桃花 2021-02-05 10:11

I\'m running code sudo apt update and fetch error

ModuleNotFoundError: No module named \'apt_pkg\'.

Please, help me s

4条回答
  •  名媛妹妹
    2021-02-05 10:28

    I had this issue, it was caused because I had installed python 3.6.9 with 3.5.2 (Ubuntu 16.04) I had also used sudo update-alternatives --config python3 to not use auto setting it back to auto solved the problem for me (and then giving 3.6.9 priority was the next step to get the newest version of python running by default) New user: I can't reply to other comments :(

提交回复
热议问题