Louis Marr
Louis Marr

Reputation: 43

Python Problems with PIL and tkinter

/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 /Users/drlou/PycharmProjects/finalproject/graphics.py
Traceback (most recent call last):
  File "/Users/drlou/PycharmProjects/finalproject/graphics.py", line 5, in <module>
    import PIL
ImportError: No module named PIL

Process finished with exit code 1

This is currently my error message and I'm having a lot of trouble getting my python to connect to PIL and tkinter. I installed PIL with homebrew and when it said at first when I tried to run the program and it said it didn't find PIL i moved the PIL folder into the python folder hoping that it would recognize it. It didn't and now I'm trying to figure out a way to link the two. Im new to coding so I know this seems stupid but I have yet to find any answers on the web. It also looks like PIL was already installed on my mac because when i search for it 2 folders pop up. So I'm wondering now why python wasn't able to find PIL in the first place before I installed it using homebrew. Thanks for the help!

Upvotes: 0

Views: 786

Answers (1)

Splize
Splize

Reputation: 11

'''#ImportError: No module named PIL'''

Either PIL wasn't installed correctly, or the location where it was installed is wrong. PIL doesn't come with python with TKinter, so you'll have to download and install it separately off this website:


http://www.pythonware.com/products/pil/


Installing modules is different for every os, but it is generally the same for every module you can get your hands on in the same os.

on a mac, drag and drop the file location into terminal, after you write cd and a [space]. should look like this:

cd /Users/Username/...

press enter

after, write:

python setup.py install

if your on a windows, there are so much tutorials I don't really need to cover it. http://www.instructables.com/id/How-to-install-Python-packages-on-Windows-7/

if you did all of this already, you may have a problem, which is individual to your computer. If you can give more info, i'd be glad to help.

edit:

found something that may be helpful: Installing PIL with pip

Upvotes: 1

Related Questions