1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Caffe+GPU+Opencv3.1+Python3.5+Anaconda:fatal error: Python.h: No such file or...

Discussão em 'Python' iniciado por Stack, Setembro 15, 2025.

  1. Stack

    Stack Membro Participativo

    Briefly I want to use Caffe these day for my project. My OS is Ubuntu 14.04, with Opencv3.1+Python3.5+Anaconda+GPU I have already passed all:

    make all
    make pycaffe
    make test
    make runtest


    However when can try to make pycaffe, it cannot pass:


    Python.h: No such file or directory​

    Here is my 'makefile.config', and I am sure the 'Python.h' has already in the path, which make me quite confused.

    USE_CUDNN := 1
    OPENCV_VERSION := 3
    ANACONDA_HOME := $(HOME)/anaconda3
    PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
    $(ANACONDA_HOME)/include/python3.5m \
    $(ANACONDA_HOME)/lib/python3.5/site-packages/numpy/core/include \
    PYTHON_LIB := $(ANACONDA_HOME)/lib
    INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
    LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
    USE_PKG_CONFIG := 1
    PYTHON_LIBRARIES := boost_python3 python3.5m
    PYTHON_INCLUDE := /usr/include/python3.5m \
    /usr/lib/python3.5/dist-packages/numpy/core/include


    Because I use Python3.5, so I uncomment the following:

    PYTHON_INCLUDE := /usr/include/python2.7 \
    /usr/lib/python2.7/dist-packages/numpy/core/include
    PYTHON_LIB := /usr/lib


    I really appreciate someone could help,

    Continue reading...

Compartilhe esta Página