0

I am having trouble importing numpy into my project. I am using python 2.7.10 and when i try to run the script i get the error :

Traceback (most recent call last):
  File "test.py", line 2, in <module>
    import numpy as np
  File "/usr/local/lib/python2.7/site-packages/numpy/__init__.py", line         180, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 58, in <module>
    from numpy.testing import Tester
  File "/usr/local/lib/python2.7/site-packages/numpy/testing/__init__.py", line 14, in <module>
    from .utils import *
  File "/usr/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 15, in <module>
    from tempfile import mkdtemp
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 32, in <module>
    import io as _io
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError:      dlopen(/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions    /2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found:      __PyCodecInfo_GetIncrementalDecoder
  Referenced from:      /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/li    b/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/li    b/python2.7/lib-dynload/_io.so

Any ideas on whats causing the issue?

Jake Leveroni
  • 102
  • 1
  • 9
  • 1
    [This](http://stackoverflow.com/questions/34386527/symbol-not-found-pycodecinfo-getincrementaldecoder-trying-to-register-a-packa) might help? – adarsh Feb 24 '16 at 21:30
  • 1
    It looks like you made some sort of local numpy installation and mixed some versions of python (you said you use 2.7.10, but there's 2.7.11 mentioned in the path). I'd suggest to remove this locally build (?) package and install numpy from your distro's repositories. – nsilent22 Feb 24 '16 at 21:38

0 Answers0