由于缺少 pyconfig.h,无法安装软件

由于缺少 pyconfig.h,无法安装软件

我正在使用带有 python 2.7.6 的 Ubuntu 14.04,但pyconfig.h缺少了。

最后更新后,它说缺少头文件。

命令是

sudo pip install <software>

怎么解决呢?

答案1

该文件是各种包的一部分:

libpython2.7-dbg: /usr/include/python2.7_d/pyconfig.h
libpython2.7-dbg: /usr/include/x86_64-linux-gnu/python2.7_d/pyconfig.h
libpython2.7-dev: /usr/include/python2.7/pyconfig.h
libpython2.7-dev: /usr/include/x86_64-linux-gnu/python2.7/pyconfig.h
libpython3.4-dbg: /usr/include/python3.4dm/pyconfig.h
libpython3.4-dbg: /usr/include/x86_64-linux-gnu/python3.4dm/pyconfig.h
libpython3.4-dev: /usr/include/python3.4m/pyconfig.h
libpython3.4-dev: /usr/include/x86_64-linux-gnu/python3.4m/pyconfig.h
pypy-dev: /usr/lib/pypy/include/pyconfig.h

就你的情况来说,我想说你需要

sudo apt-get install libpython2.7-dev

相关内容