I am using the scipy module's `imread` and `imsave` utilities. I get the following error:

> 
> No module named `imsave`.
> 
> 
> 

I did a little googling and figured that the error was due to PIL/Pillow not being installed. I do:

```
sudo pip install Pillow.

```

I get the following message:

> 
> Requirement already satisfied: Pillow in `/usr/local/lib/python2.7/dist-packages`.
> 
> 
> 

I am importing scipy's misc functionality to use the imread and imsave function. 

```
    import scipy.misc
    import numpy as np
    I = np.load('image.npy')
    scipy.misc.imsave('test_image.jpg',I) #The error pops up here
    J = scipy.misc.imread('test_image.jpg')

```

I reinstalled scipy after this. I still get the No module named error. 

EDIT 1: To make things clear, I uninstalled PIL by following this [link](https://stackoverflow.com/questions/17169435/uninstalling-pil-built-from-source). I then uninstalled scipy. But, when I run `sudo apt install python-scipy python-pil`, it says that pil is already the latest. However, it is not in the path `/usr/local/lib/python2.7/dist-package`. 

EDIT 2: To answer Mark Mikofski's questions: 
I am using Python from the Terminal. I run the file from the Terminal. 

```
    `which python` 

```

gives me the following output 

```
    `/home/raghuram/bin/python`. 

```

Importing sys and doing what you tell gives the list of following outputs:

```
    /home/raghuram/lib/python2.7
    /home/raghuram/lib/python2.7/plat-x86_64-linux-gnu
    /home/raghuram/lib/python2.7/lib-tk
    /home/raghuram/lib/python2.7/lib-old
    /home/raghuram/lib/python2.7/lib-dynload
    /usr/lib/python2.7
    /usr/lib/python2.7/plat-x86_64-linux-gnu
    /usr/lib/python2.7/lib-tk
    /home/raghuram/local/lib/python2.7/site-packages
    /home/raghuram/lib/python2.7/site-packages

```

Scipy's version is 0.19.0