error C1083: 无法打开包括文件: “pyconfig.h”: No such file or directory (..\..\src\caffe\layer_factory.cpp)

问题:在编译libcaffe.lib时,会提示

error C1083: 无法打开包括文件: “pyconfig.h”: No such file or directory (..\..\src\caffe\layer_factory.cpp)  D:\NugetPackages\boost.1.59.0.0\lib\native\include\boost\python\detail\wrap_python.hpp 

 在对应的目录下搜索pyconfig.h确实不存在。

解决办法:

打开CommonSettings.props文件,修改<PythonDir>C:\Anaconda2</PythonDir>路径为自己电脑本地Python路径即可。 

大功告成!!!

猜你喜欢

转载自blog.csdn.net/qq_42189368/article/details/83895218