Did you install Python through Homebrew already?

--
Please do not email me anything that you are not comfortable also sharing with 
the NSA.

On Sep 16, 2013, at 10:06 AM, Ian Danforth <[email protected]> wrote:

> I started by removing $NTA and $NUPIC and doing a fresh checkout and have 
> done a clean build several times. Rather than go to the extreme length of 
> reinstalling python, I'd like to track down the root cause of this issue so 
> that a fix can be automated.
> 
> Ian
> 
> 
> On Mon, Sep 16, 2013 at 5:43 AM, Tao Effect <[email protected]> wrote:
> These errors look identical to what I was running into and managed to fix in 
> a recent pull request that was merged a few weeks ago.
> 
> I would recommend installing Python using Homebrew and then doing a clean 
> build of NuPIC (i.e. deleting the nta folder).
> 
> Kind regards,
> Greg Slepak
> 
> — @taoffect on GitHub and elsewhere
> 
> --
> Please do not email me anything that you are not comfortable also sharing 
> with the NSA.
> 
> On Sep 16, 2013, at 12:15 AM, Ian Danforth <[email protected]> wrote:
> 
>> Matt,
>> 
>>  I ran 'sudo pip unintsall matplotlib' and this made python fall back to the 
>> version supplied by NuPIC, which is version .98.5.2 (released 2008!). And 
>> that let me import pylab and get run_tests.sh complete. Going to rebuild and 
>> see if it clears up any other issues.
>> 
>> Ian
>> 
>> 
>> On Sun, Sep 15, 2013 at 9:02 PM, Ian Danforth <[email protected]> 
>> wrote:
>> Matt,
>> 
>>  Can you reply with your output for these versions if you have them? Numpy, 
>> matplotlib, scipy, and scikit-learn are not happy on my system and you might 
>> be in a similar situation.
>> 
>> Ian
>> 
>> >>> import numpy
>> >>> import matplotlib
>> >>> import scipy
>> >>> numpy.__version__
>> '1.7.1'
>> >>> matplotlib.__version__
>> '1.3.x'
>> >>> scipy.__version__
>> '0.13.0.dev-c31f167'
>> >>> import sklearn
>> RuntimeError: module compiled against API version 8 but this version of 
>> numpy is 7
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File 
>> "/Library/Python/2.7/site-packages/scikit_learn-0.14_git-py2.7-macosx-10.8-intel.egg/sklearn/__init__.py",
>>  line 32, in <module>
>>     from .base import clone
>>   File 
>> "/Library/Python/2.7/site-packages/scikit_learn-0.14_git-py2.7-macosx-10.8-intel.egg/sklearn/base.py",
>>  line 10, in <module>
>>     from scipy import sparse
>>   File 
>> "/Library/Python/2.7/site-packages/scipy-0.13.0.dev_c31f167_20130307-py2.7-macosx-10.8-intel.egg/scipy/sparse/__init__.py",
>>  line 182, in <module>
>>     from .csr import *
>>   File 
>> "/Library/Python/2.7/site-packages/scipy-0.13.0.dev_c31f167_20130307-py2.7-macosx-10.8-intel.egg/scipy/sparse/csr.py",
>>  line 15, in <module>
>>     from .sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
>>   File 
>> "/Library/Python/2.7/site-packages/scipy-0.13.0.dev_c31f167_20130307-py2.7-macosx-10.8-intel.egg/scipy/sparse/sparsetools/__init__.py",
>>  line 5, in <module>
>>     from .csr import *
>>   File 
>> "/Library/Python/2.7/site-packages/scipy-0.13.0.dev_c31f167_20130307-py2.7-macosx-10.8-intel.egg/scipy/sparse/sparsetools/csr.py",
>>  line 26, in <module>
>>     _csr = swig_import_helper()
>>   File 
>> "/Library/Python/2.7/site-packages/scipy-0.13.0.dev_c31f167_20130307-py2.7-macosx-10.8-intel.egg/scipy/sparse/sparsetools/csr.py",
>>  line 22, in swig_import_helper
>>     _mod = imp.load_module('_csr', fp, pathname, description)
>> ImportError: numpy.core.multiarray failed to import
>> >>> 
>> 
>> 
>> 
>> On Sun, Sep 15, 2013 at 8:48 PM, Ian Danforth <[email protected]> 
>> wrote:
>> Matt,
>> 
>> I'm also having issues that end up in "RuntimeError: Could not get valid 
>> spec for Region: py.RecordSensor"
>> 
>> One thing I see is that "import pylab" fails for me with the same error 
>> you're seeing, even though importing multiarray in the normal way works. 
>> Looking into that.
>> 
>> Ian
>> 
>> 
>> On Sun, Sep 15, 2013 at 8:31 PM, Matt Keith <[email protected]> wrote:
>> I used to have a working NuPIC setup on my rMBP running OS X 10.8.4 and 
>> python 2.7, but last week I pulled the latest code from github and now I get 
>> an import error when I run any client code.  Everything builds fine and it 
>> even passes htmtest and run_tests.sh.  However, when I run the hotgym 
>> example now I get the following error:
>> 
>> -->python $NUPIC/examples/opf/clients/hotgym/hotgym.py
>> ImportError: numpy.core.multiarray failed to import
>> ERROR:  Could not get valid spec for Region: py.RecordSensor 
>> [/Users/keith/Development/nupic/nta/engine/RegionImplFactory.cpp line 452]
>> Traceback (most recent call last):
>>   File 
>> "/Users/keith/Development/nupic/examples/opf/clients/hotgym/hotgym.py", line 
>> 94, in <module>
>>     runHotgym()
>>   File 
>> "/Users/keith/Development/nupic/examples/opf/clients/hotgym/hotgym.py", line 
>> 65, in runHotgym
>>     model = createModel()
>>   File 
>> "/Users/keith/Development/nupic/examples/opf/clients/hotgym/hotgym.py", line 
>> 60, in createModel
>>     return ModelFactory.create(model_params.MODEL_PARAMS)
>>   File 
>> "/Users/keith/Development/nta/eng/lib/python2.7/site-packages/nupic/frameworks/opf/modelfactory.py",
>>  line 76, in create
>>     return modelClass(**modelConfig['modelParams'])
>>   File 
>> "/Users/keith/Development/nta/eng/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py",
>>  line 203, in __init__
>>     anomalyParams)
>>   File 
>> "/Users/keith/Development/nta/eng/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py",
>>  line 1078, in __createCLANetwork
>>     n.addRegion("sensor", "py.RecordSensor", 
>> json.dumps(dict(verbosity=sensorParams['verbosity'])))
>>   File 
>> "/Users/keith/Development/nta/eng/lib/python2.7/site-packages/nupic/engine/__init__.py",
>>  line 636, in addRegion
>>     engine.Network.addRegion(self, name, nodeType, nodeParams)
>>   File 
>> "/Users/keith/Development/nta/eng/lib/python2.7/site-packages/nupic/bindings/engine_internal.py",
>>  line 1011, in addRegion
>>     return _engine_internal.Network_addRegion(*args, **kwargs)
>> RuntimeError: Could not get valid spec for Region: py.RecordSensor
>> 
>> Is anyone else seeing this problem with the latest code?  Any ideas as to 
>> why the multiarray lib won't load?
>> 
>> The .so file was built and exists in the $NAT/eng dir at
>> -rwxr-xr-x  1 keith  staff  2921728 Sep 15 20:47 
>> lib/python2.7/site-packages/numpy/core/multiarray.so
>> And the module seems to load fine by hand:
>> >>> import numpy
>> >>> import numpy.core.multiarray
>> >>> numpy.__version__
>> '1.7.1'
>> >>> numpy.core.multiarray.__version__
>> '3.1'
>> 
>> Let me know if you would like any output from the stdout.txt file from the 
>> build.
>> 
>> Thanks,
>> 
>> Matt
>> _______________________________________________
>> nupic mailing list
>> [email protected]
>> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
>> 
>> 
>> 
>> _______________________________________________
>> nupic mailing list
>> [email protected]
>> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
> 
> 
> _______________________________________________
> nupic mailing list
> [email protected]
> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
> 
> 
> _______________________________________________
> nupic mailing list
> [email protected]
> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
nupic mailing list
[email protected]
http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org

Reply via email to