First step, install Pycaffe Notebook interface Environment
After the successful installation of Caffe in the previous step, it is possible to do the training data set through Caffe or predict various related things, just need to operate through the Caffe command at the command line, and this step Pycaffe installation and notebook environment configuration is just for more convenient to use the CA Ffe, in fact, most of the Caffe is done through Python, and notebook uses the browser as the interface, which makes it easier to write and execute Python code.
First compile the Pycaffe :
CD Caffe
{
If an error occurs when compiling Pycaffe:
Python/caffe/_caffe.cpp: £ ºfatal error:numpy/arrayobject.h: No file or directory
Workaround:
sudo apt-get install python-numpy
}
After compiling Pycaffe successfully, verify that you can import the Caffe package in Python, first into the Python environment :
ctrl+alt+tpython>>Import Caffe
If no error is indicated, Caffe installation is successful
If the following error occurs, please find the corresponding solution:
{
----Error Tip one:
File"<stdin>", line1,Inch<Module>Importerror: No module named Caffe
Workaround:
sudo echo export pythonpath="~/caffe/python" >> ~/. BASHRC
----Error message two:
Importerror:No module named skimage. Io
Workaround:
#
}
Configure the Notebook environment :
To install the Python interface depends on the library, in the Caffe root directory of the Python folder, there is a requirements.txt manifest file, which lists the required dependent libraries, follow this list to install.
When installing the SCIPY Library, the Fortran compiler (GFORTRAN) is required, and if not, the compiler will get an error, so we can install it first.
First enter the Caffe/python directory and execute the installation code :
CD Caffe/python
sudo apt- for in
After the installation is complete , execute:
You will see that the installation succeeds, the requirement already satisfied is displayed, and the installation will continue without a successful installation.
Then install Jupyter:
When the installation is complete, run notebook:
or
CAFFE (iv): Installed under Ubuntu jupyter notebook