Here is where pip installed numpy on my system:

› pip show numpy
---
Name: numpy
Version: 1.8.1
Location: /usr/local/lib/python2.7/site-packages

And Python is using it from that location:

› python
Python 2.7.6 (default, Apr  9 2014, 11:48:52)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import os
>>> os.path.abspath(numpy.__file__)
'/usr/local/lib/python2.7/site-packages/numpy/__init__.pyc'

You could try updating your PYTHONPATH so that your pip install path
is listed after your system path. Python should resolve dependency
paths listed on the right of the PYTHONPATH with higher priority.

---------
Matt Taylor
OS Community Flag-Bearer
Numenta


On Thu, Jul 24, 2014 at 9:04 PM, Mika Schiller <[email protected]> wrote:
> Hello Nupic,
>
> Getting matplotlib to work is like pulling teeth. I am running version 1.1.1
> of matplotlib and version 1.6.2 of numpy. When I do "run.py" for the hotgym
> tutorial, I get the following error:
>
>> Mikas-MacBook-Pro:model_0 mikaschiller$ python run.py
>> RuntimeError: module compiled against API version 9 but this version of
>> numpy is 6
>> Traceback (most recent call last):
>>   File "run.py", line 31, in <module>
>>     from nupic.data.inference_shifter import InferenceShifter
>>   File
>> "/Users/mikaschiller/Desktop/Python_Practice_Code/Learn_Python_the_Hard_Way/projects/skeleton/nodemotiondev/nupic/build/release/lib/python2.7/site-packages/nupic/__init__.py",
>> line 25, in <module>
>>     from nupic.bindings import engine_internal
>>   File
>> "/Users/mikaschiller/Desktop/Python_Practice_Code/Learn_Python_the_Hard_Way/projects/skeleton/nodemotiondev/nupic/build/release/lib/python2.7/site-packages/nupic/bindings/engine_internal.py",
>> line 6, in <module>
>>     import _engine_internal
>> ImportError: numpy.core.multiarray failed to import
>
>
>
> I assumed that the error means that I need to upgrade numpy to the most
> recent version. So I went ahead and did sudo pip install numpy==1.8
> It said the install was successful, but then I checked the numpy version
> again and it still says 1.6.2. I went into the numpy directory at
> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/
> and it says the version is 1.6.2. I'm assuming that this is the version that
> came pre-installed. Does anybody know where numpy installs downloads of the
> package?
>
> Thanks
>
> Mika
>
> _______________________________________________
> 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

Reply via email to