Windows 10+VS 2015+CPU only+Caffe取付ピット!!!
3785 ワード
準備:
インストールVS 2015(ネットではほぼ2013、私のパソコンには2015が入っていたので、このバージョンで試してみます)
Cmake 3.11.0
Python 2.7(パソコンにpython 3.6がインストールされていたので、このブログを参考にしましたhttp://blog.csdn.net/dream_an/article/details/51248736、python 2,3を共存させる)
cpu、cudaをインストールする必要はありません
caffeアドレスcaffe-windowsをダウンロードhttps://github.com/BVLC/caffe/tree/windows
依存ライブラリのダウンロードhttps://github.com/willyd/caffe-builder/releases自分のバージョンでダウンロード
build_の変更win.cmd
else下のif NOT DEFINED CPUを修正_ONLY set CPU_ONLY=0
if NOT DEFINED CPU_ONLY set CPU_ONLY=1
変更
if NOT DEFINED MSVC_VERSION setMSVC_VERSION=14
::Change to 1 to use Ninja generator(builds much faster)
if NOT DEFINED WITH_NINJA set WITH_NINJA=0
build_の実行win.cmdコンパイル
それから間違いを直して、穴を埋めます...Windowsは本当に面倒で、みんなはやはり公式の推薦に従って、VS 2013を使うことをお勧めします
1.windows sdkが見つかりません
彼が提示したのはwin 8 sdkですが、私はwin 10をダウンロードした後でいいです.あるいは、vsを開いてあなたがダウンロードしていないモジュールをダウンロードしてからでいいです.
2.No CMAKE_C_COMPILER could be found.
この問題はネットで半日調べたところ、パスに中国語があると言っていましたが、私のインストールは問題ありません.
解決:C:Program Files(x 86)Windows Kits8.1binx 64を環境変数に追加
そしてC:Program Files(x 86)Windows Kits8.1binx 64の
rc.exe
rcdll.dll
あなたのVSインストールディレクトリVS 2015VCbinにコピーして貼り付けて、それからもう一度実行します
scripts\build_win.cmd
それでいい
3.Could NOT find Git (missing: GIT_EXECUTABLE)
Windowsはgitをインストールして、とても簡単です
4.CMake Error at cmake/Utils.cmake:69 (string):
caffecmakeの下でUtilsを修正します.cmake,69行目引用符
5. Could NOT find Atlas (missing: Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY
Atlas_LAPACK_LIBRARY)
BLAS値をopenに変更
ついにbuild终わりました!!!感動!!!
インストールVS 2015(ネットではほぼ2013、私のパソコンには2015が入っていたので、このバージョンで試してみます)
Cmake 3.11.0
Python 2.7(パソコンにpython 3.6がインストールされていたので、このブログを参考にしましたhttp://blog.csdn.net/dream_an/article/details/51248736、python 2,3を共存させる)
cpu、cudaをインストールする必要はありません
caffeアドレスcaffe-windowsをダウンロードhttps://github.com/BVLC/caffe/tree/windows
依存ライブラリのダウンロードhttps://github.com/willyd/caffe-builder/releases自分のバージョンでダウンロード
build_の変更win.cmd
else下のif NOT DEFINED CPUを修正_ONLY set CPU_ONLY=0
if NOT DEFINED CPU_ONLY set CPU_ONLY=1
変更
if NOT DEFINED MSVC_VERSION setMSVC_VERSION=14
::Change to 1 to use Ninja generator(builds much faster)
if NOT DEFINED WITH_NINJA set WITH_NINJA=0
build_の実行win.cmdコンパイル
それから間違いを直して、穴を埋めます...Windowsは本当に面倒で、みんなはやはり公式の推薦に従って、VS 2013を使うことをお勧めします
1.windows sdkが見つかりません
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\caffe\caffe-windows\scripts\build\CMakeFiles\3.11.0-rc2\VCTargetsPath.vcxproj]
“C:\caffe\caffe-windows\scripts\build\CMakeFiles\3.11.0-rc2\VCTargetsPath.vcxproj”( ) - 。
彼が提示したのはwin 8 sdkですが、私はwin 10をダウンロードした後でいいです.あるいは、vsを開いてあなたがダウンロードしていないモジュールをダウンロードしてからでいいです.
2.No CMAKE_C_COMPILER could be found.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:18 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:18 (project):
No CMAKE_CXX_COMPILER could be found.
この問題はネットで半日調べたところ、パスに中国語があると言っていましたが、私のインストールは問題ありません.
解決:C:Program Files(x 86)Windows Kits8.1binx 64を環境変数に追加
そしてC:Program Files(x 86)Windows Kits8.1binx 64の
rc.exe
rcdll.dll
あなたのVSインストールディレクトリVS 2015VCbinにコピーして貼り付けて、それからもう一度実行します
scripts\build_win.cmd
それでいい
3.Could NOT find Git (missing: GIT_EXECUTABLE)
Windowsはgitをインストールして、とても簡単です
4.CMake Error at cmake/Utils.cmake:69 (string):
caffecmakeの下でUtilsを修正します.cmake,69行目引用符
# Function merging lists of compiler flags to single string.
# Usage:
# caffe_merge_flag_lists(out_variable [] [] ...)
function(caffe_merge_flag_lists out_var)
set(__result "")
foreach(__list ${ARGN})
foreach(__flag ${${__list}})
string(STRIP ${__flag} __flag)
set(__result "${__result} ${__flag}")
endforeach()
endforeach()
string(STRIP "${__result}" __result)
set(${out_var} ${__result} PARENT_SCOPE)
endfunction()
5. Could NOT find Atlas (missing: Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY
Atlas_LAPACK_LIBRARY)
BLAS値をopenに変更
ついにbuild终わりました!!!感動!!!