TK Framework double implementation issue : <p>I am testing out creating a GUI using the Tkinter module. I was trying to add an image to the GUI using PIL. My code looks like this:</p>

<pre><code>import Tkinter as tk
from PIL import Image, ImageTk

root = tk.Tk()
root.title('background image')

imfile = "foo.png"
im = Image.open(imfile)
im1 = ImageTk.PhotoImage(im)
</code></pre>

<p>When I run this code, I come up with some errors that lead to a segfault.</p>

<pre><code>objc[5431]: Class TKApplication is implemented in both/Users/sykeoh/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[5431]: Class TKMenu is implemented in both /Users/sykeoh/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[5431]: Class TKContentView is implemented in both /Users/sykeoh/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[5431]: Class TKWindow is implemented in both /Users/sykeoh/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
Segmentation fault: 11
</code></pre>

<p>I've looked online and it looks to be an issue with the Tk framework in my Systems library and the other in the anaconda library. However, none of the solutions really seemed to work. Any possible solutions or workarounds?</p>

<p>The issue comes with running ImageTk.Photoimage. If I remove that line of code, there is no issues.</p>
