Error loading a image file into ndarray with scipy.ndimage.imread
<p>Im trying to load a image file into a ndarray with something like this:</p>

<pre><code>image_data = ndimage.imread(image_file).astype(float)
</code></pre>

<p>but i get this error:</p>

<pre><code>/home/milos/anaconda3/envs/tensorflow/lib/python3.5/site-packages/scipy/ndimage/io.py in imread(fname, flatten, mode)
     23     if _have_pil:
     24         return _imread(fname, flatten, mode)
---&gt; 25     raise ImportError("Could not import the Python Imaging Library (PIL)"
     26                       " required to load image files.  Please refer to"
     27                       " http://pypi.python.org/pypi/PIL/ for installation"

ImportError: Could not import the Python Imaging Library (PIL) required   to load image files.  Please refer to http://pypi.python.org/pypi/PIL/ for   installation instructions.
</code></pre>

<p>I have Pillow installed inside the environment from which im running the notebook, it also shows up on pip freeze.
I also tried running it from the console but got similar error.</p>

<p>Any ideas how to fix this? Or is there a alternative way to load a image into ndarray?</p>