且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Caffe安装获取ImportError:DLL加载失败:找不到指定的模块

更新时间:2023-02-24 08:00:13

最有可能是您没有看到的更具体的依赖关系问题(Protobuf/OpenCV).首先尝试使用 C ++ API 加载示例并确保所有DLL都加载.然后,您可以更放心地将范围缩小到Python端.我建议根据您正在使用的分支,使用最新的Windows Caffe说明:

There's most likely a more specific dependency issue you are not seeing (Protobuf / OpenCV). First try using the C++ API to load an example and make sure all the DLL's load. Then you can more confidently narrow things down to the Python side. I recommend the more recent windows caffe instructions based off the branch you're using:

如上所述,我必须进行完整的重建(请注意,使用NuGet更容易找到某些依赖项).还要在上述博客的各个3rdParty.zip文件中寻找合适的protobuf二进制文件.

I had to do a complete rebuild as detailed above (note that some dependencies are easier to find with NuGet). Also be on the lookout for the right protobuf binaries in various 3rdParty.zip files throughout the above blog.

如果您可以使用Caffe的快照版本,并且不需要修改项目本身,则以下二进制文件非常容易安装和使用:

If you are okay with a snapshot version of Caffe and you don't need to modify the project itself, the following binaries are much easier to install and get working:

https://initialneil .wordpress.com/2015/07/15/caffe-vs2013-opencv-in-windows-tutorial-i/