简体   繁体   English

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

[英]ImportError: DLL load failed: The specified module could not be found. Caffe install

I am trying to install caffe on my windows, I have correctly copy caffe lib under my python site-packages folder and installed protobuf. 我正在尝试在Windows上安装caffe,我已经在我的python site-packages文件夹下正确复制了caffe lib并安装了protobuf。 But I still get the error message: 但是我仍然收到错误消息:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
    execfile(filename, namespace)
  File "C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
    exec(compile(scripttext, filename, 'exec'), glob, loc)
  File "C:/Users/sworr/Desktop/caffe-ssd/examples/ssd/score_ssd_pascal.py", line 2, in <module>
    import caffe
  File "C:\Anaconda2\lib\site-packages\caffe\__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "C:\Anaconda2\lib\site-packages\caffe\pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: DLL load failed: The specified module could not be found.

I am using Anaconda 4.0.0 64-bit. 我正在使用Anaconda 4.0.0 64位。 Please kindly help. 请帮助。

I solved this probkem by installing caffe using VS 2015 + CUDA 8.0 + Nvidia Titan X (pascal) by following the tutorial given by BLVC. 我遵循BLVC给出的教程,使用VS 2015 + CUDA 8.0 + Nvidia Titan X(pascal)安装了caffe,从而解决了这个问题。

I think the solution to this issue is building the 'runtest' programs first. 我认为解决此问题的方法是首先构建“运行测试”程序。

cmake --build . --config %CMAKE_CONFIGURATION% --target install

I am using Anaconda 4.1.12 (64-bit) and windows 7 platform. 我正在使用Anaconda 4.1.12(64位)和Windows 7平台。

There also other matters needs attention: 还有其他需要注意的事项:

  1. Remember to add the path of dependencies to your PATH environment. 请记住将依赖项的路径添加到PATH环境中。

     CAFFE_DEPENDENCIES=%CAFFE_ROOT%\\scripts\\libraries PATH=%PATH%;%CAFFE_ROOT%\\scripts\\libraries;%CAFFE_DEPENDENCIES%\\bin;%CAFFE_DEPENDENCIES%\\lib;%CAFFE_DEPENDENCIES%\\x64\\vc14\\bin 
  2. Remember to put cudnn library to cuda installation path. 切记将cudnn库放入cuda安装路径。

  3. After build the runtest program, copy the caffe package to the Anaconda's site-package path: 生成运行测试程序后,将caffe软件包复制到Anaconda的site-package路径:
    copy %CAFE_ROOT%\\python\\caffe to %ANACONDA2_ROOT%\\Lib\\site-packages\\ %CAFE_ROOT%\\python\\caffe复制到%ANACONDA2_ROOT%\\Lib\\site-packages\\

I solved this issue. 我解决了这个问题。 Please do not add caffe lib to site packages. 请不要将caffe lib添加到站点包中。 It does not require. 不需要。 Please follow the BLVC installation guide when building the Caffe. 生成Caffe时,请遵循BLVC安装指南。 Caffe will automatically download related dependencies and copy them to C:/Users/name/.caffe. Caffe将自动下载相关的依赖项并将其复制到C:/Users/name/.caffe。

When you run the build_win.cmd , it will use those dependencies and create caffe lib inside the build directory. 当您运行build_win.cmd ,它将使用这些依赖项并在build目录中创建caffe lib。

暂无
暂无

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

相关问题 导入错误:DLL 加载失败:找不到指定的模块。(Keras) - ImportError: DLL load failed: The specified module could not be found.(Keras) MeCab:“ImportError:DLL 加载失败:找不到指定的模块。” - MeCab: “ImportError: DLL load failed: The specified module could not be found.” MeCab:“ ImportError:DLL加载失败:找不到指定的模块。” - MeCab: “ImportError: DLL load failed: The specified module could not be found.” ImportError:DLL加载失败:找不到指定的过程。蟒蛇 - ImportError: DLL load failed: The specified procedure could not be found. Python ImportError:DLL加载失败:找不到指定的模块。 CV2 - ImportError: DLL load failed: The specified module could not be found. cv2 ImportError:DLL加载失败:找不到指定的模块。 “matplotlib.pyplot” - ImportError: DLL load failed: The specified module could not be found. “matplotlib.pyplot” 在pycharm ImportError中:DLL加载失败:找不到指定的模块。 导入人脸识别时 - In pycharm ImportError: DLL load failed: The specified module could not be found. while importing facerecognition 导入错误:DLL 加载失败:找不到指定的模块。 (NASA Fortran CEA 的 Python Rocketcea 包装器) - ImportError: DLL load failed: The specified module could not be found. (Python rocketcea wrapper for NASA Fortran CEA) 如何通过 xlwings 包导入 numpy? “导入错误:DLL 加载失败:找不到指定的模块。” - How to import numpy through xlwings package? "ImportError: DLL load failed: The specified module could not be found." 导入错误:DLL 加载失败:找不到指定的模块。 Tensorflow 聊天机器人 - ImportError: DLL load failed: The specified module could not be found. Tensorflow Chatbot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM