安装好numpy后,编译nervernagpu出现了下面的错误
bpl-subset/bpl_subset/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_hhb/pycuda/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-KUqgua-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_hhb/pycuda
Storing debug log for failure in /home/hhb/.pip/pip.log
make: *** [.python_install_required] Error 1
解决方法:
sudo apt-get install python-dev
https://stackoverflow.com/questions/28675357/fatal-error-pyconfig-h-no-such-file-or-directory
make doc出现的错误和解决方法
Extension error:
Could not import extension sphinxcontrib.napoleon (exception: No module named sphinxcontrib.napoleon)
修改
conf.py
api.rst conf.py generated index.rst quick_start.rst _static
hhb@lambda:~/work/lab/nervanagpu/doc/source$ pwd
/home/hhb/work/lab/nervanagpu/doc/source
33 #extensions = [
34 # 'sphinx.ext.autodoc',
35 # 'sphinx.ext.autosummary',
36 # 'sphinxcontrib.napoleon',
37 # 'sphinx.ext.doctest',
38 # 'sphinx.ext.intersphinx',
39 # 'sphinx.ext.todo',
40 # 'sphinx.ext.coverage',
41 # 'sphinx.ext.mathjax',
42 # 'sphinx.ext.ifconfig',
43 # 'sphinx.ext.viewcode',
44 #]
修改为:
46 # modified by haohaibo
47 extensions = [
48 'sphinx.ext.autodoc',
49 'sphinx.ext.autosummary',
50 'sphinx.ext.napoleon',
51 'sphinx.ext.doctest',
52 'sphinx.ext.intersphinx',
53 'sphinx.ext.todo',
54 'sphinx.ext.coverage',
55 'sphinx.ext.mathjax',
56 'sphinx.ext.ifconfig',
57 'sphinx.ext.viewcode',
58 ]
参考:
It looks like this could be an issue with the move to sphinx 1.3 and the change from sphinxcontrib.napoleon to sphinx.ext.napoleon. Can anyone else verify that a modification to conf.py alleviates this error?