2017-02-21 197 views
0

我對caffe很新穎。當我運行此命令 http://adilmoujahid.com/posts/2016/06/introduction-deep-learning-python-caffe/在Windows 10中Caffe模塊安裝失敗

:我是以下鏈接蟒蛇create_lmdb.py,我得到了以下錯誤:

文件 「create_lmdb.py」 19行,在進口朱古力; 導入錯誤:沒有模塊名爲 '朱古力'

我試着用這個鏈接,安裝朱古力:https://github.com/BVLC/caffe/tree/windows,特別是以下代碼:

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 

我已經得到了folllowing錯誤:

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 

我下載了忍者,但不知道該怎麼辦。所以,我試圖改變WITH_NINJA = 1至WITH_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 

請讓我知道應該是我的下一個步驟!提前致謝!

回答

0

第1步

在記事本+ +和更新文件的行如下(以魔鬼忍者編譯)

:: Change to 1 to use Ninja generator (builds much faster) 
if NOT DEFINED WITH_NINJA set WITH_NINJA=0 

我使用Microsoft Visual Studio 2013

:: Change MSVC_VERSION to 12 to use VS 2013 
if NOT DEFINED MSVC_VERSION set MSVC_VERSION=12 

打開build_win.cmd步驟#2

打開caffe文件夾內的build文件夾並刪除al l以前生成的文件。

第3步

的Python 3.6不正式支持和Python 3.5有一些具有挑戰性的問題。對於初學者,我會建議直接安裝python 2.7。

Install anaconda 2.7 [Anaconda 2.7][1] 

步驟#4

Execute scripts/build_win.cmd 
[1]: https://www.continuum.io/downloads 

格式化,便於代碼閱讀

+0

你可以編譯朱古力與VS 2017年+ Python 2.7版 –

+0

不斷掙扎。 @JumabekAlikhanov你有什麼成就? – Hamdard