Well crap. I'd like to step back and try to get you building from the source code first. You said you cloned the repo, so be sure to "git pull" first, then...
First make sure no old or half-installed versions of nupic are laying around: > pip uninstall nupic Run this command several times, until you get an error that "nupic" cannot be found. Sometimes you have several versions installed, especially if you're been trying to install over time. Then... > cd $NUPIC > python setup.py install --user No virtualenv required, but feel free to use one and omit the --user option. You should notice that the first thing happening is a download of the nupic.core binary file for your platform from AWS S3. The platform and SHA will be in the filename downloaded. If this command runs without an error, try running unit tests: > ./scripts/run_nupic_tests -u If you have that _math.so problem, it should pop up here right away. If not, and all the tests pass, the next test is to run the simple hotgym example: > python examples/opf/clients/hotgym/simple/hotgym.py This will output some junk to your console, but should no throw any exceptions. Please tell me how that goes and at what stage you received your first error and I'll give you instructions on building nupic.core yourself manually (it's not that hard if you have the right compiler). Thanks for your time, --------- Matt Taylor OS Community Flag-Bearer Numenta On Tue, Jan 27, 2015 at 3:39 PM, Ruaridh O'Donnell <[email protected]> wrote: > Thanks for the reply, > I’ve tried a few things, unfortunately none of them have worked. > > 1) I noticed when pip was downloading nupic from PYPI it was downloading > "nupic-0.1.0-cp27-none-macosx_10_9_intel.whl”. I assumed this was meant for > mavericks not yosemite, so I tried downloading the 10_10 version and got pip > to install it. But I ended with exactly the same error as before. > > 2) I also tried building nupic from source. I cloned the repo, set up $NUPIC, > and build it (inside a virtualenv) using “pip install -e > path/to/nupic/repo/“. The -e option in pip apparently just uses "setup.py > develop”. It seemed to build OK. > But I still ended up with the same error as before. > > 3) I got your email so I uninstalled home-brew’s python and tried “brew > install python-devel”. But brew couldn’t find any formulas with that name. > I couldn’t find any reference on development headers for home-brew python > through google. > So I tried just installing python as I had it before (with "brew install > python”) and installing nupic 0.1.2 but again I’m coming up against the same > error. > > Out of curiosity I looked at what point python crashes when running “import > nupic.bindings.math”. > It looks like it finds a file named _math.so and then crashes when trying to > import it. > > I’m not sure if any of that was helpful, I’m not too knowledgable in this > area. > > Thanks, > Ruaridh > >> On 26 Jan 2015, at 17:50, Matthew Taylor <[email protected]> wrote: >> >> Ruaridh, >> >> You may not have python development headers installed. Try "brew >> install python-devel", then re-install NuPIC. Let me know if that >> helps. >> --------- >> Matt Taylor >> OS Community Flag-Bearer >> Numenta >> >> >> On Fri, Jan 23, 2015 at 12:13 PM, Ruaridh O'Donnell >> <[email protected]> wrote: >>> Hello, >>> I’m having trouble installing NuPIC with pip on a new mac with OS X >>> Yosemite. >>> In python, NuPIC imports OK ("import nupic"), but importing >>> nupic.bindings.math and many other modules crashes python. >>> >>> For example >>> >>>>>> import nupic.bindings.math >>> Fatal Python error: PyThreadState_Get: no current thread >>> Abort trap: 6 >>> >>> or >>> >>>>>> from nupic.frameworks.opf.modelfactory import ModelFactory >>> Fatal Python error: PyThreadState_Get: no current thread >>> Abort trap: 6 >>> >>> Here’s how I installed everything (on a new mac): >>> - I installed home-brew in the standard way (“ruby -e "$(curl -fsSL >>> https://raw.githubusercontent.com/Homebrew/install/master/install)"”) >>> - installed python 2.7.9 ("homebrew install python”) >>> - installed virtualenv ("pip install virtualenv”) (this used the pip >>> corresponding to homebrew’s python) >>> - set up a virtual env in called ‘all’ in ~/ (“virtualenv all”) >>> - installed nupi dependencies ("brew install automake libtool cmake”) >>> - activated my virtualenv >>> - installed NuPIC ("pip install nupic”) >>> Everything seemed to run fine but I now get the errors mentioned above. >>> >>> I’m trying to use home-brew’s versions of python (2.7.9) rather the system >>> one that came pre installed (2.7.6). >>> Entering “python” in terminal points to homebrew’s python, not the system >>> python. >>> I tested out installing other modules with pip (in my virtualenv) and they >>> all seem to work fine. (matplotlib) >>> Creating a virtualenv uses homebrew's python >>> >>> Also when pip was installing nupic I noticed the wheel it was downloading >>> was the 10_9 file not the 10_10 that is listed on PYPI: >>> >>> Collecting nupic >>> Downloading nupic-0.1.0-cp27-none-macosx_10_9_intel.whl (6.6MB) >>> 100% |################################| 6.6MB 848kB/s >>> >>> Not sure if that’s relevant >>> >>> Any help/insight into this would be appreciated, >>> >>> Ruaridh >> >
