vs2013编译pycaffe报错:无法打开包括文件: “numpy/arrayobject.h”: No such file or directory

错误原因是:

在配置文件CommonSettings.props中,配置的IncludePath目录下找不到numpy/arrayobject.h,

解决方法:

找到numpy/arrayobject.h所在的目录,比如我的是在:D:\anaconda2\pkgs\numpy-base-1.16.5-py27hb1d0314_0\Lib\site-packages\numpy\core\include目录下,

然后修改配置:

<PropertyGroup Condition="'$(PythonSupport)'=='true'">
<!--<PythonDir>C:\Miniconda2\</PythonDir>-->
<PythonDir>D:\anaconda2\pkgs\python-2.7.16-hcb6e200_0\</PythonDir>
<PythonNumpyDir>D:\anaconda2\pkgs\numpy-base-1.16.5-py27hb1d0314_0\Lib\site-packages\numpy\core\include</PythonNumpyDir>
<LibraryPath>$(PythonDir)\libs;$(LibraryPath)</LibraryPath>
<IncludePath>$(PythonNumpyDir);$(PythonDir)\include;$(IncludePath)</IncludePath>
</PropertyGroup>

posted @ 2020-05-11 13:38  彭城老朽  阅读(1550)  评论(0)    收藏  举报