简体   繁体   English

/usr/include/boost/python/detail/wrap_python.hpp:50:23:致命错误:pyconfig.h:没有这样的文件或目录

[英]/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory

I get this error: 我收到此错误:

(cv) jalal@klein:~/computer_vision/py-faster-rcnn/caffe-fast-rcnn$ make -j8 && make pycaffe
PROTOC src/caffe/proto/caffe.proto
CXX src/caffe/blob.cpp
CXX src/caffe/data_reader.cpp
CXX src/caffe/layer.cpp
CXX src/caffe/solvers/adadelta_solver.cpp
CXX src/caffe/solvers/rmsprop_solver.cpp
CXX src/caffe/solvers/adagrad_solver.cpp
CXX src/caffe/solvers/nesterov_solver.cpp
CXX src/caffe/solvers/sgd_solver.cpp
CXX src/caffe/solvers/adam_solver.cpp
CXX src/caffe/syncedmem.cpp
CXX src/caffe/common.cpp
CXX src/caffe/internal_thread.cpp
CXX src/caffe/layer_factory.cpp
In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
                 from /usr/include/boost/python/args.hpp:8,
                 from /usr/include/boost/python.hpp:11,
                 from src/caffe/layer_factory.cpp:4:
/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
compilation terminated.
Makefile:565: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1
make: *** Waiting for unfinished jobs....

In Makefile.config I have: 在Makefile.config我有:

PYTHON_INCLUDE := /use/include/python3.4

And in Makefile I have: 在Makefile中我有:

#PYTHON_LIBRARIES ?= boost_python python2.7
PYTHON_LIBRARIES ?= boost_python python3.4

I am using virtual environment for running OpenCV3 with Python3.4.3+: 我使用虚拟环境运行OpenCV3和Python3.4.3 +:

(cv) jalal@klein:~/computer_vision/py-faster-rcnn/caffe-fast-rcnn$ python --version
Python 3.4.3+

However in in the /usr/include I have these Pythons I was not sure which one is actually for Python3.4.3+: 但是在/ usr / include中我有这些Pythons我不确定哪个实际上是Python3.4.3 +:

$ ls /usr/include/python
python2.7/  python3.4/  python3.4m/ python3.5m/ 

$ ls /usr/include/python3.4m/
abstract.h         ceval.h                enumobject.h   Imaging.h       metagrammar.h      parsetok.h     pyerrors.h     pystrcmp.h      structseq.h
accu.h             classobject.h          errcode.h      ImDib.h         methodobject.h     patchlevel.h   pyexpat.h      pystrtod.h      symtable.h
asdl.h             codecs.h               eval.h         ImPlatform.h    modsupport.h       pgen.h         pyfpe.h        Python-ast.h    sysmodule.h
ast.h              code.h                 fileobject.h   import.h        moduleobject.h     pgenheaders.h  pygetopt.h     Python.h        token.h
bitset.h           compile.h              fileutils.h    intrcheck.h     namespaceobject.h  pyarena.h      pyhash.h       pythonrun.h     traceback.h
bltinmodule.h      complexobject.h        floatobject.h  iterobject.h    node.h             pyatomic.h     pymacconfig.h  pythread.h      tupleobject.h
boolobject.h       datetime.h             frameobject.h  listobject.h    numpy              pycapsule.h    pymacro.h      pytime.h        typeslots.h
bytearrayobject.h  descrobject.h          funcobject.h   longintrepr.h   object.h           pyconfig.h     pymath.h       rangeobject.h   ucnhash.h
bytes_methods.h    dictobject.h           genobject.h    longobject.h    objimpl.h          pyctype.h      pymem.h        setobject.h     unicodeobject.h
bytesobject.h      dtoa.h                 graminit.h     marshal.h       opcode.h           py_curses.h    pyport.h       sliceobject.h   warnings.h
cellobject.h       dynamic_annotations.h  grammar.h      memoryobject.h  osdefs.h           pydebug.h      pystate.h      structmember.h  weakrefobject.h
$ ls /usr/include/python3.4
abstract.h         ceval.h                enumobject.h   Imaging.h       metagrammar.h      parsetok.h     pyerrors.h     pystrcmp.h      structseq.h
accu.h             classobject.h          errcode.h      ImDib.h         methodobject.h     patchlevel.h   pyexpat.h      pystrtod.h      symtable.h
asdl.h             codecs.h               eval.h         ImPlatform.h    modsupport.h       pgen.h         pyfpe.h        Python-ast.h    sysmodule.h
ast.h              code.h                 fileobject.h   import.h        moduleobject.h     pgenheaders.h  pygetopt.h     Python.h        token.h
bitset.h           compile.h              fileutils.h    intrcheck.h     namespaceobject.h  pyarena.h      pyhash.h       pythonrun.h     traceback.h
bltinmodule.h      complexobject.h        floatobject.h  iterobject.h    node.h             pyatomic.h     pymacconfig.h  pythread.h      tupleobject.h
boolobject.h       datetime.h             frameobject.h  listobject.h    numpy              pycapsule.h    pymacro.h      pytime.h        typeslots.h
bytearrayobject.h  descrobject.h          funcobject.h   longintrepr.h   object.h           pyconfig.h     pymath.h       rangeobject.h   ucnhash.h
bytes_methods.h    dictobject.h           genobject.h    longobject.h    objimpl.h          pyctype.h      pymem.h        setobject.h     unicodeobject.h
bytesobject.h      dtoa.h                 graminit.h     marshal.h       opcode.h           py_curses.h    pyport.h       sliceobject.h   warnings.h
cellobject.h       dynamic_annotations.h  grammar.h      memoryobject.h  osdefs.h           pydebug.h      pystate.h      structmember.h  weakrefobject.h

I have this for my Virtual Environment in the bashrc: 我在bashrc中为我的虚拟环境提供了这个:

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

Basically how can I setup Caffe to work with Python3.4.3+? 基本上我如何设置Caffe与Python3.4.3 +一起使用? https://github.com/rbgirshick/py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn

用这个

sudo apt-get install python-dev python3-dev

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法构建 boost python 库(致命错误:pyconfig.h: No such file or directory) - Cannot build boost python library (fatal error: pyconfig.h: No such file or directory) 致命错误:pyconfig.h:没有这样的文件或目录 - Fatal error: pyconfig.h: No such file or directory 使用“ #include”导入时,Boost Python“无法打开源文件&#39;pyconfig.h&#39;” <boost\\python.hpp> ” - Boost Python “cannot open source file 'pyconfig.h'” when importing using “#include <boost\python.hpp>” 无法使Buildozer在ubuntu中工作-“严重错误:arm-linux-gnueabi / python2.7 / pyconfig.h:无此类文件或目录” - Unable to get Buildozer to work in ubuntu - “fatal error: arm-linux-gnueabi/python2.7/pyconfig.h: No such file or directory” pyconfig.h - 无法打开包含文件:&#39;io.h&#39;:没有这样的文件或目录 - pyconfig.h - Cannot open include file: 'io.h': No such file or directory 在cpp proj中没有这样的文件pyconfig.h - No such file pyconfig.h in cpp proj Ubuntu,致命错误:Python.h: No such file or directory #include<Python.h> - Ubuntu, fatal error: Python.h: No such file or directory #include <Python.h> C 致命错误:Python.h:没有这样的文件或目录#include<Python.h> - C fatal error: Python.h: No such file or directory #include <Python.h> Python 2.7 pip install 失败,缺少 pyconfig.h,可能安装的源分发错误? - Python 2.7 pip install fails missing pyconfig.h, maybe installed source distribution wrong? 致命错误:Python.h:没有这样的文件或目录 - fatal error: Python.h: No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM