小编yod*_*ama的帖子

ModuleNotFoundError: 没有名为“apt_pkg”的模块

在我的 linux raspbian 发行版上安装 python 3.6.8 后,当我尝试安装 libunwind8 时出现错误:

ModuleNotFoundError: No module named 'apt_pkg'
Run Code Online (Sandbox Code Playgroud)

调试后我发现以下 SO 页面错误答案没有帮助:导入错误没有名为 apt-pkg 的模块

给出的答案说安装python-apt,我做了,只是得到以下错误:

Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 29, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
(Reading database ... 41347 files and directories currently installed.)
Preparing to unpack .../gnupg-agent_2.1.18-8~deb9u4_armhf.deb ...
Unpacking gnupg-agent (2.1.18-8~deb9u4) over (2.1.18-8~deb9u3) ...
Setting up gnupg-agent (2.1.18-8~deb9u4) ...
(Reading database ... 41347 files and directories currently installed.)
Preparing to unpack .../gnupg_2.1.18-8~deb9u4_armhf.deb ...
Unpacking gnupg …
Run Code Online (Sandbox Code Playgroud)

linux debian python

2
推荐指数
1
解决办法
3万
查看次数

标签 统计

debian ×1

linux ×1

python ×1