Wednesday, October 21, 2015

Pycaffe installation and trouble shooting

Caffe is a Deep learning framwork from BLVC.
Pycaffe is a Python interface of Caffe framework.
This posting deals with the troubles you might encounter while you are installing Pycaffe.


  1. Caffe install


The like below provides a very detailed installation process. Follow the instructions and install all the dependencies.  




  1. pycaffe install  


But you might have a problem with Ubuntu 14.04 repo.


2.1 make pycaffe


first, go to the directory that Caffe is installed. type this.


$ make pycaffe


2.2 edit ~/.bashrc


PYTHONPATH=${HOME}/python:$PYTHONPATH
2.3 install google protobuff




export PYTHONPATH=${HOME}/python:$PYTHONPATH
export PYTHONPATH="${PYTHONPATH}:/home/inctrl/python"
export PYTHONPATH="${PYTHONPATH}:/home/inctrl/Dropbox/PycharmProjects/caffe-master/python"


2.4 Setup ~/.bashrc as follows


export PYTHONPATH=${HOME}/python:$PYTHONPATH
export PYTHONPATH="${PYTHONPATH}:/home/inctrl/python"
export PYTHONPATH="${PYTHONPATH}:/home/inctrl/Dropbox/PycharmProjects/caffe-master/python"
export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.7/dist-packages"


PYTHONPATH=${HOME}/python:$PYTHONPATH

JAVA_HOME=/usr/lib/jvm/java
export JAVA_HOME
export PATH=$PATH:/usr/lib/jvm/java-7-openjdk/bin
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk

export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64




3. how to run pycaffe examples with ipython notebook (ipynb)


  • ipython notebook error ?


upgrade it to bradnew version (4.0.0)


  • Tornado Error ?
sudo apt-get remove python-tornado
sudo pip install tornado
  • UsageError: Invalid GUI request u'inline' ?


pycaffe uses matplotlib “inline” feature.
You shoud use “ipython QTconsole”
->ipython qtconsole


qtconsole webpage :


libcuda error shooting :


When terminal is not starting in Ubuntu

Untitled Document.md When terminal in Ubuntu is not starting gnome-termial crashes with python 3.6 update. Go to /usr/bin/gnome-termi...