Python 在Windows 10中安装Caffe模块失败
我对咖啡馆很陌生。我一直在关注这个链接: 当我运行以下命令时:python create_lmdb.py,我得到了以下错误:Python 在Windows 10中安装Caffe模块失败,python,neural-network,caffe,conv-neural-network,pycaffe,Python,Neural Network,Caffe,Conv Neural Network,Pycaffe,我对咖啡馆很陌生。我一直在关注这个链接: 当我运行以下命令时:python create_lmdb.py,我得到了以下错误: CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error:
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Project_git/caffe/scripts/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
文件“create_lmdb.py”,第19行,导入caffe;
导入错误:没有名为“caffe”的模块。
我尝试使用以下链接安装caffe:,特别是以下代码:
C:\Projects> git clone https://github.com/BVLC/caffe.git
C:\Projects> cd caffe
C:\Projects\caffe> git checkout windows
:: Edit any of the options inside build_win.cmd to suit your needs
C:\Projects\caffe> scripts\build_win.cmd
我有以下错误:
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Project_git/caffe/scripts/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
我下载了忍者,但不知道该怎么办。所以我试着用_NINJA=1改为_NINJA=0,然后我得到了以下错误
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Python34/python.exe (found suitable version "3.4.3", minimum required is "2.7")
CMake Error at cmake/WindowsDownloadPrebuiltDependencies.cmake:29 (message):
Could not find url for MSVC version = 1900 and Python version = 3.4.
Call Stack (most recent call first):
CMakeLists.txt:75 (include)
-- Configuring incomplete, errors occurred!
See also C:/Project_git/caffe/scripts/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
请让我知道下一步该做什么!提前谢谢 步骤#1
在记事本++中打开build_win.cmd并更新文件行,如下所示(以破坏忍者版本)
我正在使用Microsoft Visual Studio 2013
:: Change MSVC_VERSION to 12 to use VS 2013
if NOT DEFINED MSVC_VERSION set MSVC_VERSION=12
第2步
打开caffe文件夹中的build文件夹并删除以前生成的所有文件
第三步
Python3.6没有得到官方支持,Python3.5存在一些具有挑战性的问题。对于初学者,我建议直接安装Python2.7
Install anaconda 2.7 [Anaconda 2.7][1]
第四步
重新格式化代码以便于阅读您能否在VS 2017+Python 2.7仍在挣扎的情况下编译caffe@JumabekAlikhanov你成功了吗?
Execute scripts/build_win.cmd
[1]: https://www.continuum.io/downloads