gpt4 book ai didi

python - 如何使用 Python.h 文件来制作 python C 扩展

转载 作者:行者123 更新时间:2023-11-30 14:34:37 27 4
gpt4 key购买 nike

我想为 python 制作 c 扩展。我了解 C 的基础知识,并且由于更好的性能而想要进行扩展。我不太了解 Visual Studio 和 C。所以请体谅一下。

我搜索了很多,但没有找到任何有效的解决方案。当我试图 #include <Python.h>文件,它说找不到它。我该怎么办?

最佳答案

MS 有一份专门针对您的具体案例的文档,其中包含分步说明:Write C++ extensions for Python - Visual Studio | Microsoft Docs

简而言之,你

请注意,没有与 distutils、pytest、tox 等进一步集成。

关于python - 如何使用 Python.h 文件来制作 python C 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58900372/

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