BUG|caffe依賴

問題1:

E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-imgproc-dev_2.4.9.1+dfsg-1.5ubuntu1_amd64.deb? Hash Sum mismatch

E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

解決方案:

sudo apt-get --fix-missing install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler



問題2:

make all

CXX src/caffe/blob.cpp

In file included from ./include/caffe/blob.hpp:8:0,

from src/caffe/blob.cpp:4:

./include/caffe/common.hpp:4:32: fatal error: boost/shared_ptr.hpp: No such file or directory

compilation terminated.

Makefile:581: recipe for target '.build_release/src/caffe/blob.o' failed

make: *** [.build_release/src/caffe/blob.o] Error 1

解決方案:

sudo apt-get install --no-install-recommends libboost-all-dev


問題3:

./include/caffe/common.hpp:5:27: fatal error: gflags/gflags.h: No such file or directory

compilation terminated.

Makefile:581: recipe for target '.build_release/src/caffe/layers/mvn_layer.o' failed

解決方案:

https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-ec2-instance


問題4:

./include/caffe/common.hpp:6:26: fatal error: glog/logging.h: No such file or directory

compilation terminated.

Makefile:581: recipe for target '.build_release/src/caffe/layers/mvn_layer.o' failed

解決方案:

install glog


問題5:

ImportError: No module named _caffe

解決方案:

make pycaffe

~/.bashrc add PYTHONPATH=/home/weishu/caffe/python


問題6:

weishu@weishu-Vostro-3667:~/caffe$ make pytest

CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp

python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory

compilation terminated.

Makefile:507: recipe for target 'python/caffe/_caffe.so' failed

make: *** [python/caffe/_caffe.so] Error 1

解決方案:

sudo apt-get install python-numpy



問題7:

ERROR: test_draw (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_draw

ImportError: No module named pydot

Makefile:536: recipe for target 'pytest' failed

make: *** [pytest] Error 1

sudo pip install pydot

ERROR: test_draw_net (test_draw.TestDraw)

Exception: "dot" not found in path.

Makefile:536: recipe for target 'pytest' failed

make: *** [pytest] Error 1

解決方案:

先安裝graphviz否則會出現(xiàn)類似:"dot" not found in path 的問題

安裝graphviz不要用pip install安裝,否則還是會找不到可執(zhí)行程序

安裝:

sudo apt-get install graphviz

然后安裝pydot:

sudo pip3 install pydot

其中pyparsing會自動安裝


問題8:

ImportError: No module named keras.layers

解決方案:

sudo pip3 install keras


問題9:

ImportError: No module named _tkinter, please install the python-tk package

pip install python-tk

Collecting python-tk

Could not find a version that satisfies the requirement python-tk (from versions: )

No matching distribution found for python-tk

解決方案:

sudo apt-get install python-tk


問題10:

ERROR: test_coord_map (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_coord_map

ImportError: No module named skimage.io

解決方案:

sudo apt-get install python-skimage


問題11:

ERROR: test_draw (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_draw

from google.protobuf import text_format

ImportError: No module named google.protobuf

解決方案:

sudo apt-get install python-protobuf

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容