每当我尝试安装任何软件包时,pip都会失败

时间:2018-10-18 13:08:03

标签: python linux 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.

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

1 个答案:

答案 0 :(得分:1)

您应该可以通过以下方式查看已保存的软件包的列表:

length

然后通过

取消保留它们
load_c_string_with_my_c_function

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

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