Python: Installed Anaconda, but can't import numpy or matplotlib in Jupyter notebook
<p>I'm new to Python, so maybe there is a simple solution to this. I installed Anaconda and thought everything would be straightforward, but even though Jupyter works fine I can't import numpy and matplotlib into my notebook. Instead I get this error:</p>

<pre><code>---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
&lt;ipython-input-1-1e0540761e0c&gt; in &lt;module&gt;()
----&gt; 1 import matplotlib.pyplot as plt
      2 vals = [1, 2, 3, 4]
      3 plt.plot(vals)

//anaconda/lib/python3.5/site-packages/matplotlib/__init__.py in &lt;module&gt;()
    120 # cbook must import matplotlib only within function
    121 # definitions, so it is safe to import from it here.
--&gt; 122 from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
    123 from matplotlib.compat import subprocess
    124 from matplotlib.rcsetup import (defaultParams,

//anaconda/lib/python3.5/site-packages/matplotlib/cbook.py in &lt;module&gt;()
     31 from weakref import ref, WeakKeyDictionary
     32 
---&gt; 33 import numpy as np
     34 import numpy.ma as ma
     35 

//anaconda/lib/python3.5/site-packages/numpy/__init__.py in &lt;module&gt;()
    144         return loader(*packages, **options)
    145 
--&gt; 146     from . import add_newdocs
    147     __all__ = ['add_newdocs',
    148                'ModuleDeprecationWarning',

//anaconda/lib/python3.5/site-packages/numpy/add_newdocs.py in &lt;module&gt;()
     11 from __future__ import division, absolute_import, print_function
     12 
---&gt; 13 from numpy.lib import add_newdoc
     14 
     15 ###############################################################################

//anaconda/lib/python3.5/site-packages/numpy/lib/__init__.py in &lt;module&gt;()
      6 from numpy.version import version as __version__
      7 
----&gt; 8 from .type_check import *
      9 from .index_tricks import *
     10 from .function_base import *

//anaconda/lib/python3.5/site-packages/numpy/lib/type_check.py in &lt;module&gt;()
      9            'common_type']
     10 
---&gt; 11 import numpy.core.numeric as _nx
     12 from numpy.core.numeric import asarray, asanyarray, array, isnan, \
     13                 obj2sctype, zeros

//anaconda/lib/python3.5/site-packages/numpy/core/__init__.py in &lt;module&gt;()
     12         os.environ[envkey] = '1'
     13         env_added.append(envkey)
---&gt; 14 from . import multiarray
     15 for envkey in env_added:
     16     del os.environ[envkey]

ImportError: dlopen(//anaconda/lib/python3.5/site-packages/numpy/core/multiarray.so, 10): Symbol not found: _strnlen
  Referenced from: /anaconda/lib/python3.5/site-packages/numpy/core/../../../..//libmkl_intel_lp64.dylib
  Expected in: flat namespace
 in /anaconda/lib/python3.5/site-packages/numpy/core/../../../..//libmkl_intel_lp64.dylib
</code></pre>

<p>Since both packages show up in <code>$ conda list</code> its probably some kind of linking error(?), but that is unfortunately something a beginner can hardly solve for himself. Can anyone help? </p>

<p>The key to your problem is possibly that you're running a pretty old Mac OS X version as <code>_strnlen</code> wasn't even available <a href="http://stackoverflow.com/q/32468480/4354477">until 10.7 release</a>. </p>

<p>Anaconda is built for at least OS X 10.7 (according to <a href="https://groups.google.com/a/continuum.io/forum/m/#!topic/anaconda/QxVJifuRWiI" rel="nofollow">this</a>), so you're probably out of luck here and a possible solution would be to upgrade the system. </p>

python numpy matplotlib anaconda jupyter-notebook