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否则会出现类似:"dot" not found in path 的问题

安装graphviz不要用pip install安装,否则还是会找不到可执行程序

安装:

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容