What steps reproduce the bug?
Following the Ubuntu Installation instructions...
# Git clone BVLC/caffe
sudo apt-get update
sudo apt-get install -y git
mkdir Workspace && cd Workspace
git clone https://github.com/BVLC/caffe.git
cd caffe && git checkout -b rc3-build rc3
# Caffe RC3 with ATLAS
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install libatlas-base-dev # ATLAS
cd ~/Workspace/caffe && cp Makefile.config.example Makefile.config
make all # -j8
make test
make runtest
# PyCaffe
sudo apt-get install -y python-dev
vim Makefile.config # See issue 4537: https://github.com/BVLC/caffe/issues/4537
make pycaffe
At this point compilation fails with the message below.
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
#include <Python.h> // NOLINT(build/include_alpha)
^
compilation terminated.
make: *** [python/caffe/_caffe.so] Error 1
Can you reproduce the bug using the latest master, compiled with the DEBUG make option? Yes
What hardware and operating system/distribution are you running? AWS g2.2xlarge instance running Ubuntu Server 14.04 LTS (ami-2d39803a)
@martyychang Thanks for the detailed report, but it seems that you may have skipped the step of installing the Python prerequisites by
for req in $(cat requirements.txt); do pip install $req; done
or Anaconda as covered by http://caffe.berkeleyvision.org/installation.html#python. (That is, unless you went back and installed these and updated your Makefile.config as #4537 suggests you might have.) If you have installed the Python prerequisites and still have this error, then you might need to correct your paths.
If you still have trouble, I suggest beginning with Docker setup first to get up and running and try Caffe.
Please note that we prefer to field installation and usage questions on our mailing list instead of on github issues, where we focus on development. If you still have trouble, follow up there. From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:
_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.
Or using apt-get install
~
sudo apt-get install cython
sudo apt-get install python-numpy
sudo apt-get install python-scipy
sudo apt-get install python-skimage
sudo apt-get install python-matplotlib
sudo apt-get install ipython
sudo apt-get install python-h5py
sudo apt-get install python-leveldb
sudo apt-get install python-networkx
sudo apt-get install python-nose
sudo apt-get install python-pandas
sudo apt-get install python-dateutil
sudo apt-get install python-protobuf
sudo apt-get install python-gflags
sudo apt-get install python-yaml
sudo apt-get install python-pil
sudo apt-get install python-six
~
when i am giving this command.. make pycaffe
I am getting error..how to solve this?
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
#include
^
compilation terminated.
make: * [python/caffe/_caffe.so] Error 1
@srbnghosh99 you can follow this:
https://stackoverflow.com/questions/39874099/caffegpuopencv3-1python3-5anacondafatal-error-python-h-no-such-file-or-di/44135622#44135622
Most helpful comment
@martyychang Thanks for the detailed report, but it seems that you may have skipped the step of installing the Python prerequisites by
or Anaconda as covered by http://caffe.berkeleyvision.org/installation.html#python. (That is, unless you went back and installed these and updated your Makefile.config as #4537 suggests you might have.) If you have installed the Python prerequisites and still have this error, then you might need to correct your paths.
If you still have trouble, I suggest beginning with Docker setup first to get up and running and try Caffe.
Please note that we prefer to field installation and usage questions on our mailing list instead of on github issues, where we focus on development. If you still have trouble, follow up there. From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md: