pycaffe 配置与安装-Linux平台



1.安装环境配置:

~$sudo apt-get update

~$sudo apt-get install python-pip python-dev python-numpy

~$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 gfortran graphviz

~$sudo apt-get install protobuf-c-compiler protobuf-compiler


2.在caffe/python 下有一个requirement.txt,里面有所需要安装的所有库。

cd caffe/python

for req in $(cat requirements.txt); do pip install $req; done

3.编译
cd ~/caffe

sudo make pycaffe -j8


但我在第一次执行时出错了,说是好多引用找不到。后来,打开了sudo gedit /etc/profile  在后面加了个几个路径,再执行就可以正常安装了,路径如下:

export PYTHONPATH=$PYTHONPATH:/home/gjh/caffe/python
使上述更改生效

$ source /etc/profile

4.测试pycaffe

$ Python
Python 2.7.13 |Anaconda, Inc.| (default, Sep 22 2017, 00:47:24)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

nkszjx2

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值