安装ansible时,报fatal error: Python.h: No such file or directory

需要安装python-devel这个包:

For apt (ubuntu, debian...):

sudo apt-get install python-dev  # for python2.x installs
sudo apt-get install python3-dev  # for python3.x installs

For yum (centos, redhat, fedora...):

sudo yum install python-devel

你可能感兴趣的:(python)