Nupic install: python include files?

Good morning,

Install attempt number two. Now trying with a 64 bit installation.

Here’s the error I get while trying to do the nupic install

  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Isrc -I/usr/include/python2.7 -c _proj.c -o build/temp.linux-x86_64-2.7/_proj.o
  _**proj.c:4:20: fatal error: Python.h: No such file or directory**
**  compilation terminated.**
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Looks like I’m missing the python/C++ compatibility library/code.

OS: Linux Mint 18.1
Python 2.7.12
pip 9.0.1
setuptools 36.0.0
wheel 0.29.0

gcc was installed but not dev environment so I installed it using

sudo aptitude install libc-dev g++ build-essential.

Does anyone know how to install the python compatibility layer?

Thanks!
Jay

1 Like

You need to install python development headers.

Do you by any chance know how to install them or what the python compatibility library is called? I’m not even sure what to google for

1 Like

I think this is what you are a looking for. On ubuntu the command is apt-get python-dev.

https://community.linuxmint.com/software/view/python-dev

Woot!

sudo apt-get install python-dev

worked. Thanks for the help.

1 Like

Since everything on the vm I created is open source I could put the VM files up for public download. It might make a quick and easy way for people to get started playing with nupic.

Go for it. Others have done the same in the past. :smiley:

Most of the time these are dependency-issues. When encountering this error please note before the error it may say you are missing a package or header file — you should find those and install them and verify if it works

For Python 2.x use:

$ sudo apt-get install python-dev

If you using python3, try to replace python-dev with python3-dev

For a specific version of Python 3, replace x with the minor version in

$ sudo apt-get install python3.x-dev