我目前正在Macbook上使用python设置caffe。我发誓所有的先决条件都没问题,但是当我尝试构建caffe时它会返回错误。怎么了? 这是控制台:
/bin/sh: /usr/local/cuda/bin/nvcc: No such file or directory
awk: syntax error at source line 1
context is
{exit >>> < <<< 7.0;}
awk: illegal statement at source line 1
CXX src/caffe/blob.cpp
CXX src/caffe/common.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/internal_thread.cpp
/bin/sh: .build_release/src/caffe/blob.o.warnings.txt: Permission denied
/bin/sh: .build_release/src/caffe/common.o.warnings.txt: Permission denied
/bin/sh: .build_release/src/caffe/data_transformer.o.warnings.txt: Permission denied
/bin/sh: .build_release/src/caffe/internal_thread.o.warnings.txt: Permission denied
cat: .build_release/src/caffe/common.o.warnings.txt: No such file or directory
In file included from src/caffe/blob.cpp:4:
In file included from ./include/caffe/blob.hpp:8:
In file included from ./include/caffe/common.hpp:19:
./include/caffe/util/device_alternate.hpp:34:10: fatal error: 'cublas_v2.h' file not found
#include <cublas_v2.h>
^
1 error generated.
cat: .build_release/src/caffe/data_transformer.o.warnings.txt: No such file or directory
make: *** [.build_release/src/caffe/common.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [.build_release/src/caffe/blob.o] Error 1
make: *** [.build_release/src/caffe/data_transformer.o] Error 1
cat: .build_release/src/caffe/internal_thread.o.warnings.txt: No such file or directory
make: *** [.build_release/src/caffe/internal_thread.o] Error 1
好的,现在前面提到的问题已经解决了,但还有另一个问题,有人能帮助我吗?
sh-3.2# cd /Users/Leo/Documents/caffe
sh-3.2# make all
CXX src/caffe/blob.cpp
In file included from src/caffe/blob.cpp:4:
In file included from ./include/caffe/blob.hpp:10:
In file included from ./include/caffe/syncedmem.hpp:7:
In file included from ./include/caffe/util/math_functions.hpp:11:
./include/caffe/util/mkl_alternate.hpp:11:10: fatal error: 'cblas.h' file not found
#include <cblas.h>
^
1 error generated.
make: *** [.build_release/src/caffe/blob.o] Error 1
答案 0 :(得分:1)
对于其他发现此问题的人。只有在你要使用它的机器上有Nvidia卡时才需要CUDA开发工具包。对于大多数Mac用户而言,情况可能并非如此(请检查您的硬件规格)。如果您没有这种显卡,则无法使用CUDA。只需在编译Caffe之前禁用它:
CPU_ONLY := 1
表示不需要CUDA。答案 1 :(得分:0)
我猜你必须安装cuda dev。试剂盒中。