1

My pip didn't work for any package:

 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

when I tried to fix this by

sudo apt-get install python3-dev

I got this:

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.

and i can't install any of these dependencies!Could someone help me out.

1
  • Try sudo apt-get update and then again sudo apt-get install python3-dev. Does that help?
    – janos
    Commented Oct 18, 2018 at 13:37

1 Answer 1

1

You should be able to see the list of held packages by:

apt-mark showhold 

and then un-hold them by

sudo apt-mark unhold <package name>

After that, you should be able to remove the conflicting packages and then reinstall all.

Try removing all the unmet dependencies and then reinstalling.

1
  • thanks, but this didn't seem to work...apt-mark showhold shows nothing at all
    – Lucas
    Commented Oct 18, 2018 at 13:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.