фатальная ошибка: Python.h: нет такого файла или каталога (не разрешено с помощью python-devel)

При попытке скомпилировать pycaffe на Ubuntu 16.04, с установленной Anaconda 3.6, я получаю следующую ошибку:

python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory

Я попытался установить пакеты python-devel с помощью

sudo apt-get install python3-dev sudo apt-get install python3.5-dev sudo apt-get install python3.6-dev

Но даже после попытки с каждой из них по отдельности возникает одна и та же ошибка.

Правильная PATH, кажется, добавлена ​​в .bashrc

export PATH="home/jdevezas/anaconda/bin:$PATH"

И в файле makefile.config Caffe У меня есть

# 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/anaconda #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

Я также пытался с Python 2.7 без каких-либо результатов. Я проверил /usr/include/python3.5m и Python.h есть. Предложения?

1
задан 18 February 2018 в 23:47

0 ответов

Другие вопросы по тегам:

Похожие вопросы: