shackenberg / Minimal-Bag-of-Visual-Words-Image-Classifier

Implementation of a content based image classifier using the bag of visual words approach in Python together with Lowe's SIFT and Libsvm.
236 stars 94 forks source link

No module named PIL in sift.py #13

Closed IshaanGupta5 closed 8 years ago

IshaanGupta5 commented 8 years ago

Hello I am trying to run your project on my windows laptop.Currently, I have installed libsvm and sift manually from the links you mentioned.But an error occurs in the sift.py file when it tries to import "from PIL import Image". I am using anaconda for running this project from my working directory and I even tried installing PIL, which was done successfully. Can you please tell me what am I doing wrong?Or what are the correct steps to get started with this code? Please forgive me if I am not following proper steps to comment here.I am new to github and it's procedures.

shackenberg commented 8 years ago

What happens if you enter from PIL import Image in your python interpreter?

IshaanGupta5 commented 8 years ago

"No module named PIL"

shackenberg commented 8 years ago

This looks like an issue with anaconda. Anaconda should come with PILLOW which is the library that provides a version of the PIL module. See here the list of packages: https://docs.continuum.io/anaconda/pkg-docs

IshaanGupta5 commented 8 years ago

The same problem persists even after installing PIL package from Anaconda website. Should I run this project from windows command prompt only?

shackenberg commented 8 years ago

Does it work from the windows command prompt?

IshaanGupta5 commented 8 years ago

I was fiddling with Anaconda and I found out that it needs the files to be present in the same directory as the software.So ,I copied the files there and "pip install(ed) pylab" and other modules Now I am stuck on this error "The _imaging C module is not installed". Any pointers?

IshaanGupta5 commented 8 years ago

I even pip install(ed) Image in Anaconda prompt but still the error remains.

shackenberg commented 8 years ago

Hi, for me it looks like there is an issue with your Anaconda installation. You would need to ask them. I don't have any experiences with Anaconda on Windows.

IshaanGupta5 commented 8 years ago

Okay.Will ask on their forums.Thank you! Just one quick question: Is there any alternative you could suggest to make all this work on Windows without so much pain(I can't install Ubuntu as my system doesn't allow for installation in virtualbox)?

shackenberg commented 8 years ago

As far as I know Anaconda is by far best way to use Python on Windows.