In [1]: import numpy as np
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-0aa0b027fcb6> in <module>()
----> 1 import numpy as np
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.py in <module>()
151 return loader(*packages, **options)
152
--> 153 from . import add_newdocs
154 __all__ = ['add_newdocs', 'ModuleDeprecationWarning']
155
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/add_newdocs.py in <module>()
11 from __future__ import division, absolute_import, print_function
12
---> 13 from numpy.lib import add_newdoc
14
15 ###############################################################################
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/lib/__init__.py in <module>()
6 from numpy.version import version as __version__
7
----> 8 from .type_check import *
9 from .index_tricks import *
10 from .function_base import *
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/lib/type_check.py in <module>()
9 'common_type']
10
---> 11 import numpy.core.numeric as _nx
12 from numpy.core.numeric import asarray, asanyarray, array, isnan, \
13 obj2sctype, zeros
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/__init__.py in <module>()
4 from numpy.version import version as __version__
5
----> 6 from . import multiarray
7 from . import umath
8 from . import _internal # for freeze programs
ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/multiarray.so, 2): Symbol not found: _PyBuffer_Type
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/multiarray.so
Expected in: flat namespace
in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/multiarray.so
I and Jack Ireland tried a few things but could not get this problem to be fixed. I would appreciate if anyone could help.
Thanks.
I agree, it looks like you are still using system python rather than anaconda. check that your $PATH is correct and has your anaconda installation in it.
Stuart
--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at https://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.
/Users/cua-user/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
Like I mentioned, when I run python, Anaconda version runs but when I try to run, for instance, numpy, I get the aforementioned error. I will appreciate your input. Thanks.
localadmins-MacBook-Pro:~ cua-user$ ipython
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import sunpy
In [2]: sunpy.self_test(online=False)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-3f87d9c47c53> in <module>()
----> 1 sunpy.self_test(online=False)
AttributeError: module 'sunpy' has no attribute 'self_test'
In [3]:
I would appreciate your input.
Thanks
Niraj
In [1]: import sunpy
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-1a62dedba559> in <module>()
----> 1 import sunpy
~/anaconda3/lib/python3.6/site-packages/sunpy/__init__.py in <module>()
22 __githash__ = ''
23
---> 24 from sunpy.util.config import load_config, print_config
25 from sunpy.util import system_info
26 from sunpy.tests import main as self_test
~/anaconda3/lib/python3.6/site-packages/sunpy/util/__init__.py in <module>()
4 from sunpy.util.exceptions import *
5 from sunpy.util.decorators import *
----> 6 from sunpy.util.util import *
7 from sunpy.util.sysinfo import *
8 from sunpy.util.metadata import MetaDict
~/anaconda3/lib/python3.6/site-packages/sunpy/util/util.py in <module>()
8 from itertools import count
9
---> 10 import numpy as np
11
12 from sunpy.extern import six
In [2]:
Any help would be appreciated.
Sincerely,
Niraj