简体   繁体   English

Windows 缺少 Python.h

[英]Windows missing Python.h

I'm trying to run a sample Theano code that uses GPU on windows.我正在尝试在 Windows 上运行使用 GPU 的示例 Theano 代码。 My python (with python-dev and Theano and all required libraries) was installed from Anaconda.我的 python(带有 python-dev 和 Theano 以及所有必需的库)是从 Anaconda 安装的。 This is the error I run into:这是我遇到的错误:

Cannot open include file: 'Python.h': No such file or directory

My Python.h is actually in c://Anaconda/include/我的Python.h实际上在c://Anaconda/include/

I'm guessing that I should add that directory to some environmental variable, but I don't know which.我猜我应该将该目录添加到某个环境变量中,但我不知道是哪个。

如果您在 Windows 中使用 Visual Studio,请在解决方案资源管理器中右键单击您的项目并按如下方式导航:属性 -> C/C++ -> 常规 -> 附加包含目录 -> 添加 C:/Anaconda/include/(或无论您的 Anaconda 安装位于何处)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM