gpt4 book ai didi

python-3.x - SWIG : fatal error: 'Python.h' file not found

转载 作者:行者123 更新时间:2023-12-02 10:51:12 33 4
gpt4 key购买 nike

当我尝试编译时,它告诉我缺少<Python.h>文件。
如何获得<Python.h>文件?没有它,我将无法编译我的东西。

我在MacOS版本10.12.6上

这是我的终端的屏幕截图:

enter image description here

最佳答案

Python header 的包含路径看起来错误。

您有-I/usr/ bin /python3.7。即使在MacOS上,我也可以肯定bin是错误的,因为那是Python解释器本身。但是,这确实取决于您在何处以及如何获得此Python版本,正确的路径将是什么。可能是-I/usr/include/python3.7,但是请确保您可能想要使用find / -name 'Python.h之类的东西,并查看系统上当前安装了什么。

关于python-3.x - SWIG : fatal error: 'Python.h' file not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54402218/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com