您的位置:首页 > Web前端

pycaffe 搭建:常见问题解决办法

2017-06-21 19:37 295 查看
配置pycaffe:


安装依赖库:

sudo apt-get install python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags Cython ipython
sudo apt-get install protobuf-c-compiler protobuf-compiler


编译:

$ cd ~/caffe
$ make pycaffe


添加~/caffe/python到$PYTHONPATH:

$ sudo gedit /etc/profile

# 添加: export PYTHONPATH=/path/to/caffe/python:$PYTHONPATH

$ source /etc/profile # 使之生效




测试是否可以引用: some time should run in the directury of:    gaoenyang@gaoenyang-Lenovo:~/Downloads/caffe-master/python

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
>>>


问题:

ImportError: No module named google.protobuf.internal
解决方法: 
sudo pip install --upgrade protobuf

问题:
出现了如下的错误,说我找不到skimage.io模块。
import skimage.io
ImportError: No module named skimage.io
解决办法:

sudo pip install scikit-image
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐