Python.h quirk

Eric S. Raymond esr at
Sat Sep 21 18:03:28 UTC 2019

Hal Murray via devel <devel at>:
> I'm on Fedora.  I've been using python2 for ages.  I just tried to switch to 
> python3.
> My "python" command now links to python3.7
> It all builds, then dies trying to run the version printout tests which really 
> test that it can load all the libraries it needs.  That died in while 
> trying to import ntp.ntpc
> It turns out that building had used the Python.h from python2 rather than the one for python3
> Downhill from there.
> Can we do anything to fix that?  Or trap it?
> It works after I uninstall python2-devel

Oh, that's a nasty one.

The problem, of course, is that the Python 2 and Python3 development package both want to own Python.h, 
and the name is not versioned.

I don't see any fix for this other than "have the right dev kit installed whebn you build".
		<a href="">Eric S. Raymond</a>

More information about the devel mailing list