Question

I am very new in using python how to install PIL on eclipse am using python 33 in my code I see this error

from PIL include Image

Error : no module named PIL 

I have tried

import Image

no errors at the import part on eclipse but there is an error on

Image.open(image_stream)

Error: Undefined variable from import: open PyDev breakpoint

when I run from command window no module named Image

The file site-packages is empty I don't know how to include packages

Was it helpful?

Solution

Your question should be

How to install packages in Python 3?

  1. go to https://www.python.org/downloads/ and download Python 3.4 or newer. (This has the pip command to install packages)
  2. install it.
  3. open a console

  4. type

    pip3.4 install pillow
    

    if this does not work then use the full path (example for windows):

    C:\Python34\Scripts\pip3.4 install pillow
    
  5. the import statement should work now

    import PIL
    

If you search for this you can find many answers: https://stackoverflow.com/search?q=python+install+PIL

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top