gpt4 book ai didi

python - 每次我尝试安装任何软件包时 pip 都会失败

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:33:55 24 4
gpt4 key购买 nike

我的 pip 不适用于任何包:

 regex_3/_regex.c:46:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

当我试图通过

解决这个问题时
sudo apt-get install python3-dev

我明白了:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
python3-dev : Depends: python3 (= 3.5.1-3) but 3.5.1-4 is to be installed
Depends: libpython3-dev (= 3.5.1-3) but it is not going to be installed
Depends: python3.5-dev (>= 3.5.1-2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

而且我无法安装任何这些依赖项!有人可以帮我吗。

最佳答案

您应该能够通过以下方式查看保留包的列表:

apt-mark showhold 

然后通过

取消按住它们
sudo apt-mark unhold <package name>

在那之后,您应该能够删除冲突的包,然后重新安装所有包。

尝试删除所有未满足的依赖项,然后重新安装。

关于python - 每次我尝试安装任何软件包时 pip 都会失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52874789/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com