Python.h is nothing but a header file. It is used by gcc to build applications. You need to install a package called python-dev. This package includes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications.
请尝试安装这些软件包。
我在大学里遇到了同样的问题,在我最后一年的主要项目中安装了LinuxMint,下面的第三个解决方案对我有效。
当遇到此错误时,请注意,在出现错误之前,它可能会说您丢失了包或头文件,您应该找到这些文件并安装它们并验证它是否有效。(例如ssl->;libssl)
对于Python 2.x使用:
对于Python 2.7使用:
对于Python 3.x使用:
对于Python 3.4使用:
对于Python 3.7使用:
输入:
或
见http://www.cyberciti.biz/faq/debian-ubuntu-linux-python-h-file-not-found-error-solution/
相关问题 更多 >
编程相关推荐