【发布时间】:2018-10-18 13:08:03
【问题描述】:
我的 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.
我无法安装任何这些依赖项!谁能帮帮我。
【问题讨论】:
-
尝试
sudo apt-get update,然后再次尝试sudo apt-get install python3-dev。这有帮助吗?