返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
FAQ & Tips

ModuleNotFoundError--No-module-named-'apt_pkg'-Error Resolution

Preface Encountered this issue today while installing Docker. Solved it by searching for solutions, so I'm documenting it here. I suspect the cause is that I upgraded the system's Python version today and then changed the python3 soft link to point to the latest version. Solution sudo apt-get remove --purge python-apt sudo apt-get install python-apt -f cd /usr/lib/python3/dist

曦远 (DealiAxy)约 2 分钟
目录3 个章节

Preface

Today, I encountered this issue while installing Docker and resolved it by searching for solutions, so I'm documenting it here. I suspect the cause is that I upgraded the system's Python version today, and then I also changed the python3 symlink to point to the latest version.

Solution

sudo apt-get remove --purge python-apt
sudo apt-get install python-apt -f 
cd /usr/lib/python3/dist-packages/ 
sudo cp apt_pkg.cpython-3?m-x86_64-linux-gnu.so apt_pkg.cpython-36m-x86_64-linux-gnu.so 

Reference Materials

https://blog.csdn.net/u013427969/article/details/80011355

_EOF_

ModuleNotFoundError--No-module-named-'apt_pkg'-Error Resolution

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…

ModuleNotFoundError--No-module-named-'apt_pkg'-Error Resolution · StarBlog