第一步、安装 pycaffe notebook 接口环境

在上一步成功安装 caffe 之后,就可以通过 caffe 去做训练数据集或者预测各种相关的事了,只不过需要在命令行下通过 caffe 命令进行操作,而这一步 pycaffe 的安装以及 notebook 环境配置只是为了更方便的去使用 caffe ,实际上大多数都是通过 python 来操作 caffe 的,而 notebook 使用浏览器作为界面,可以更方便的编写和执行 python 代码。

首先编译 pycaffe :

cd caffe
sudo make pycaffe -j8

{

如果编译 pycaffe 时出现的错误:

  python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: 没有那个文件或目录

解决方法:

  sudo apt-get install python-numpy

}

编译 pycaffe 成功后,验证一下是否可以在 python 中导入 caffe 包,首先进入 python 环境:

ctrl+alt+T
python
>>import caffe

如果没有错误提示则表示caffe安装成功

如果出现以下错误请寻找对应解决办法:

{

----错误提示一:

File "<stdin>", line 1, in <module>   ImportError: No module named caffe

解决办法:

sudo echo export PYTHONPATH="~/caffe/python" >> ~/.bashrc
source ~/.bashrc

----错误提示二:

  ImportError: No module named skimage.io

解决办法:

pip install -U scikit-image #若没有安装pip: sudo apt install python-pip 

}

配置notebook环境 :

首先要安装python接口依赖库,在caffe根目录的python文件夹下,有一个requirements.txt的清单文件,上面列出了需要的依赖库,按照这个清单安装就可以了。

在安装scipy库的时候,需要fortran编译器(gfortran),如果没有这个编译器就会报错,因此,我们可以先安装一下。

首先进入 caffe/python 目录下,执行安装代码:

cd caffe/python
sudo apt-get install gfortran
for req in $(cat requirements.txt); do sudo pip install $req; done

安装完成以后执行:

sudo pip install -r requirements.txt 

就会看到,安装成功的,都会显示Requirement already satisfied, 没有安装成功的,会继续安装。

然后安装 jupyter :

sudo pip install jupyter 

安装完成后运行 notebook :

jupyter notebook 

ipython notebook 

CAFFE(四):Ubuntu 下安装jupyter notebook的更多相关文章

  1. ubuntu下设置jupyter notebook 2017年07月29日 19:28:34 小旋锋 阅读数:8329 标签: ubuntu 更多 个人分类: python 二三事 来源:http://blog.csdn.net/suzyu12345/article/details/51037905 Ipython Notebook现在已经改名为Ipython jupyter,是最知名最好用的

    ubuntu下设置jupyter notebook     来源:http://blog.csdn.net/suzyu12345/article/details/51037905 Ipython No ...

  2. 来杯Caffe——在ubuntu下安装Caffe框架并测试

    Caffe是一种深度学习框架...blablabla...... Caffe要在ubuntu下安装 1. 安装依赖 sudo apt-get install libatlas-base-dev sud ...

  3. 在windows下安装Jupyter Notebook的安装和使用

    1 认识jupyter jupyter /ˈdʒuːpɪtə(r)/可以提供适合捕捉整个计算过程的基于web的应用程序:开发.记录和执行代码,以及结果输出. jupyter Notebook提供了两个 ...

  4. 安装Conda并在Conda下安装jupyter notebook

    1:安装 conda install jupyter notebook 2:启动 jupyter notebook

  5. windows远程访问ubuntu下的jupyter notebook必要配置

    0.生成配置文件(一般采用默认) jupyter notebook --generate-config 1.打开ipython, 创建一个密文密码 In [1]: from notebook.auth ...

  6. Ubuntu下安装Tensorflow

    本文目录 引言 基于Anaconda的tensorflow安装 1 下载linux版本的Anaconda安装包 2 安装Anaconda 利用anaconda安装tensorflow 1 建立一个 c ...

  7. Windows下的Jupyter Notebook 安装与自定义启动(图文详解)

    不多说,直接上干货! 前期博客 Windows下的Python 3.6.1的下载与安装(适合32bits和64bits)(图文详解) 这是我自定义的Python 的安装目录 (D:\SoftWare\ ...

  8. Windows下的Jupyter Notebook 安装与自定义启动

    1.Jupyter Notebook 和 pip 为了更加方便地写 Python 代码,还需要安装 Jupyter notebook. 利用 pip 安装 Jupyter notebook. 为什么要 ...

  9. Docker最全教程之Ubuntu下安装Docker(十四)

    前言 Ubuntu是一个以桌面应用为主的开源GNU/Linux操作系统,应用很广.本篇主要讲述Ubuntu下使用SSH远程登录并安装Docker,并且提供了Docker安装的两种方式,希望对大家有所帮 ...

随机推荐

  1. React Native init初始化项目时报错

    之前新建RN项目都不会出现这个问题,今天报错如下,这里记录下吧. 报错截图: This will walk you through creating a new React Native projec ...

  2. TextView的封装和自定义

    实现的效果如下: #import <UIKit/UIKit.h> @interface CustomTextView : UITextView @property (nonatomic , ...

  3. windows进入指定目录

    1.进入cmd 2.输入盘符比如:E: 3.切换目录 cd E:\progect\Firstdjango 实例:

  4. centos安装tidy扩展

    wget http://pecl.php.net/get/tidy-1.2.tgztar -xvzf tidy-1.2.tgzcd tidy-1.2/usr/local/php/bin/phpize. ...

  5. mysql left join对于索引不生效的问题

    SELECT t.val, m.username FROM  test.tmp_table AS t LEFT JOIN cehome.uc_members AS m USE INDEX(`mobil ...

  6. OnPreInit,OnInit ,OnInitComplete ,OnPreLoad ,Page_Load等执行顺序

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  7. [System Design] Design a distributed key value caching system, like Memcached or Redis

    https://www.interviewbit.com/problems/design-cache/ Features: This is the first part of any system d ...

  8. 花里胡哨,如何在Linux终端输出带有颜色的字体,将带颜色的字体赋值给变量

    背景 ​ 在日常操作Linux的情况下,总会遇到一些需求,比如说,把输出的内容用不同颜色标注出来,以达到醒目.提示的目的,那么如何在Linux终端输出带有颜色的字体呢? Linux终端输出字符颜色 ​ ...

  9. Nginx04---实现直播

    比如树莓派开启一个直播服务如何开启: 百度搜索:搭建自己的直播服务器(nginx + RTMP)

  10. 洛谷P2659 美丽的序列 单调栈模板

    P2659 美丽的序列 题目链接 https://www.luogu.org/problemnew/show/P2659 题目描述 为了研究这个序列的美丽程度,GD定义了一个序列的"美丽度& ...