Troubleshooting Installation on Ubuntu 16.04

Visit the official Caffe2 installation site for the latest instructions.

Run python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure" to see if Caffe2 was installed properly. If "Failure" is outputted, check the following:

Caffe2 missing in Python module search path - Did you run the command within caffe2/build? If not, cd into caffe2/build or export PYTHONPATH=$PYTHONPATH:/path/to/caffe2/build so that the Python module search path will include caffe2.python.

Anaconda using outdated libgcc - If you have Anaconda installed, open up the Python shell.

>>> from caffe2.python import core
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:root:Debug message: /home/$USER/anaconda2/bin/../lib/ version `CXXABI_1.3.8' not found (required by caffe2/python/caffe
CRITICAL:root:Cannot load caffe2.python. Error: /home/$USER/anaconda2/bin/../lib/ version `GLIBCXX_3.4.20' not found (required
by caffe2/python/

This means Anaconda has an outdated To double check this, run strings ~/anaconda2/lib/ | grep GLIBCXX_3.4. This should be missing GLIBCXX_3.4.20. To fix this issue, run conda install libgcc. Running strings ~/anaconda2/lib/ | grep GLIBCXX_3.4 should now show GLIBCXX_3.4.20, which will mean that caffe2.python can be loaded.

Hosting Jupyter Notebook on Server

  • (on server) jupyter notebook --no-browser --port=8889
  • (on laptop) ssh -N -f -L localhost:8885:localhost:8889 user@remotehost
  • Copy the URL printed by Jupyter on the server, and replace the 8889 with 8885. Visit this URL on your laptop.