# Installation issue on CentOS 6.5: invalid ELF header

**URL:** https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853
**Category:** NuPIC
**Tags:** question
**Created:** [September 19, 2017, 10:14am UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853 "2017-09-19T10:14:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![friedrice](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@friedrice](https://discourse.numenta.org/u/friedrice)
#### Post date: [September 19, 2017, 10:14am UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/1 "2017-09-19T10:14:05Z")

</div>

Hi, there. I just wanna try out NAB demo on my CentOS with python 2.7.13 installed. I’ve already installed nupic(1.0.4.dev0) and nupic.bindings(1.0.1) from PyPI. When I try to run [run.py](http://run.py), the compiler just throw the following errors:

```auto
        Traceback (most recent call last):
      File "run.py", line 178, in <module>
        from nab.detectors.numenta.numenta_detector import NumentaDetector
      File "/root/NAB/nab/detectors/numenta/numenta_detector.py", line 23, in <module>
        from nupic.algorithms import anomaly_likelihood
      File "/usr/local/lib/python2.7/site-packages/nupic-1.0.4.dev0-py2.7.egg/nupic/algorithms/ __init__.py", line 27, in <module>
        from nupic.bindings.math import NearestNeighbor
      File "/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py", line 49, in <module>
        _math = swig_import_helper()
      File "/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py", line 45, in swig_import_helper
        _mod = imp.load_module('_math', fp, pathname, description)
    ImportError: /usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/_math.so: invalid ELF header

```

Looking forward to your reply!

---

<div class="post-metadata">

### Author: ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)
#### Post date: [September 19, 2017, 3:50pm UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/2 "2017-09-19T15:50:46Z")

</div>

I don’t think you have NuPIC installed properly. Looks like you installed from source, can you go into `$NUPIC` and run `./scripts/run_nupic_tests.py --unit` and see if unit tests pass?

---

<div class="post-metadata">

### Author: ![friedrice](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@friedrice](https://discourse.numenta.org/u/friedrice)
#### Post date: [September 20, 2017, 1:11am UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/3 "2017-09-20T01:11:32Z")

</div>

Just tried the code you provided, got these errors. Do I need to reinstall NuPIC?  
Traceback (most recent call last):  
File “./scripts/run\_nupic\_tests.py”, line 262, in   
os.chdir(os.getenv(‘NUPIC’))  
TypeError: coercing to Unicode: need string or buffer, NoneType found

---

<div class="post-metadata">

### Author: ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)
#### Post date: [September 20, 2017, 1:12am UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/4 "2017-09-20T01:12:44Z")

</div>

First set the `NUPIC` environment variable to be the path to your nupic checkout. Then try running the script again.

---

<div class="post-metadata">

### Author: ![friedrice](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@friedrice](https://discourse.numenta.org/u/friedrice)
#### Post date: [September 20, 2017, 1:55am UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/5 "2017-09-20T01:55:52Z")

</div>

Hi, Matt. I’ve managed to run the test code, but it returned the same result as I provided above. By the way, if I wanna run NAB demo, do I have to install nupic.core, or just nupic + nupic.bindings? Thank you.

```
_________ERROR collecting tests/unit/nupic/regions/tm_region_test.py__________
ImportError while importing test module '/root/nupic/tests/unit/nupic/regions/tm_region_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/unit/nupic/regions/tm_region_test.py:33: in <module>
    from nupic.regions.tm_region import TMRegion
/usr/local/lib/python2.7/site-packages/nupic-1.0.4.dev0-py2.7.egg/nupic/regions/tm_region.py:32: in <module>
    from nupic.algorithms import (anomaly, backtracking_tm, backtracking_tm_cpp,
/usr/local/lib/python2.7/site-packages/nupic-1.0.4.dev0-py2.7.egg/nupic/algorithms/ __init__.py:27: in <module>
    from nupic.bindings.math import NearestNeighbor
/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py:49: in <module>
    _math = swig_import_helper()
/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py:45: in swig_import_helper
    _mod = imp.load_module('_math', fp, pathname, description)
E ImportError: /usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/_math.so: invalid ELF header
```

---

<div class="post-metadata">

### Author: ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)
#### Post date: [September 20, 2017, 4:59pm UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/6 "2017-09-20T16:59:50Z")

</div>

I think I’m confused about how you have NuPIC installed. You said you installed nupic 1.0.4.dev0 from PyPi, but that’s not possible. We don’t publish dev builds to pypi. If you have 1.0.4.dev0 installed, you must have installed from source code. Can you [follow these directions](https://discourse.numenta.org/t/how-to-check-what-version-of-nupic-is-installed/1045) to find out what version you really have installed?

---

<div class="post-metadata">

### Author: ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)
#### Post date: [September 22, 2017, 2:00pm UTC](https://discourse.numenta.org/t/installation-issue-on-centos-6-5-invalid-elf-header/2853/7 "2017-09-22T14:00:22Z")

</div>

2 posts were split to a new topic: [How to show NuPIC running live online](https://discourse.numenta.org/t/how-to-show-nupic-running-live-online/2868)
