即使执行以下步骤,我也收到“ ImportError:没有名为_caffe的模块”
1)conda config-添加通道conda-forge
2)conda config --add频道willyd
3)conda install-是cmake忍者numpy scipy protobuf == 3.1.0六个scikit-image pyyaml pydotplus graphviz
4)git clone https://github.com/BVLC/caffe.git
5)CD Caffe
6)git checkout窗口
7)scripts \ build_win.cmd
以下为输出内容
INFO:================================================ ===========
信息:摘要:
INFO:================================================ ===========
信息:MSVC_VERSION = 14
信息:WITH_NINJA = 0
INFO:CMAKE_GENERATOR =“ Visual Studio 14 2015 Win64”
信息:CPU_ONLY = 1
INFO:CUDA_ARCH_NAME =自动
INFO:CMAKE_CONFIG =发布
信息:USE_NCCL = 0
信息:CMAKE_BUILD_SHARED_LIBS = 0
信息:PYTHON_VERSION = 2
信息:BUILD_PYTHON = 0
INFO:BUILD_PYTHON_LAYER = 1
信息:BUILD_MATLAB = 1
INFO:PYTHON_EXE =“ python”
信息:RUN_TESTS = 0
信息:RUN_LINT = 0
信息:RUN_INSTALL = 0
INFO:================================================ ===========
...
561警告
0个错误
时间已过00:07:17.35
E:\deeplearning\caffe>python
Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 18:37:09) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "E:\deeplearning\caffe\python\caffe\__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "E:\deeplearning\caffe\python\caffe\pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: No module named _caffe
caffe也被添加到路径中,但是问题仍然存在。我正在按照“ https://github.com/BVLC/caffe/tree/windows”的说明进行操作。 而且我无法从git存储库下载任何预构建的二进制文件
>>> sys.path
['', 'E:\\deeplearning\\caffe\\python',
我什至将caffe文件夹从'E:\ deeplearning \ caffe \ python'复制到'C:\ Users \ Ambi \ Anaconda2 \ Lib \ site-packages'
请帮助我解决此问题,以下是其他信息
Python版本= 2.7
Visual Studio = 2015