No module names Image (Django)

When developing a Django application, you may require to have a field where you ask the user to upload an image and this image is ought to be stored in database. But Whoop!!.. you can’t move further because you have got an error that says “No module named Image”.
This can be easily solved using following command in terminal:

#sudo pip install pil 

But this sometimes is not easily installed and gives following error :


Solving this is also very easy. You need to install python-dev package.

#sudo apt-get install python-dev


#sudo pip install pil 

won’t give any error.
Happy coding!!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s