I'm installing Caffe on an Ubuntu 16.04 system with CUDA 9.1 and cuDNN 7.0.5
I successfully compiled Caffe with the "make all" command but when trying to compile pycaffe with "make pycaffe" I get the following error:
  CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
  python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
  compilation terminated.
  Makefile:507: recipe for target 'python/caffe/_caffe.so' failed
  make: *** [python/caffe/_caffe.so] Error 1
I'm using Anaconda 2.7.14 which is located at (with 'which conda' command):
  /home/jdevezas/anaconda2/bin/conda
Here's how the makefile.config for Caffe looks:
  # NOTE: this is required only if you will compile the python interface.
  # We need to be able to find Python.h and numpy/arrayobject.h.
  #PYTHON_INCLUDE := /usr/include/python2.7 \
  /usr/lib/python2.7/dist-packages/numpy/core/include
  # Anaconda Python distribution is quite popular. Include path:
  # Verify anaconda location, sometimes it's in root.
   ANACONDA_HOME := /home/jdevezas/anaconda2
   PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
  $(ANACONDA_HOME)/include/python2.7 \
  $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include
 Â
  # Uncomment to use Python 3 (default is Python 2)
  # PYTHON_LIBRARIES := boost_python3 python3.5m
  # PYTHON_INCLUDE := /usr/include/python3.5m \
  #         /usr/lib/python3.5/dist-packages/numpy/core/include
 Â
  # We need to be able to find libpythonX.X.so or .dylib.
  # PYTHON_LIB := /usr/lib
   PYTHON_LIB := $(ANACONDA_HOME)/lib
I have the following line at the end of the .bashrc file:
    # added by Anaconda2 installer
  export PATH="/home/jdevezas/anaconda2/bin:$PATH"
Any help would be appreciated