使用Pillow / TCL挣扎导入图像时出现问题

时间:2016-06-16 17:47:22

标签: python tkinter tk pillow

我在尝试使用Pillow导入图片时遇到一些错误,这些图片让我觉得我在圈子里跑。我的代码遵循“工具栏”示例here

我从一开始就遇到了这个错误:

objc[571]: Class TKApplication is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
objc[571]: Class TKMenu is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
objc[571]: Class TKContentView is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
objc[571]: Class TKWindow is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
Segmentation fault: 11

在查看之前的StackOverflow帖子后,我决定卸载8.6版以修复版本冲突。但是,在我这样做之后,我收到此错误,因为无法再找到版本8.6:

Traceback (most recent call last):
  File "untitled.py", line 66, in <module>
    main()  
  File "untitled.py", line 61, in main
    app = Example(root)
  File "untitled.py", line 26, in __init__
    self.initUI()
  File "untitled.py", line 41, in initUI
    eimg = ImageTk.PhotoImage(self.img)  
  File "build/bdist.macosx-10.6-intel/egg/PIL/ImageTk.py", line 115, in __init__
  File "build/bdist.macosx-10.6-intel/egg/PIL/ImageTk.py", line 180, in paste
  File "build/bdist.macosx-10.6-intel/egg/PIL/_imagingtk.py", line 7, in <module>
  File "build/bdist.macosx-10.6-intel/egg/PIL/_imagingtk.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/Hanners 1/.python-eggs/Pillow-3.2.0-py2.7-macosx-10.6-intel.egg-tmp/PIL/_imagingtk.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl
  Referenced from: /Users/Hanners 1/.python-eggs/Pillow-3.2.0-py2.7-macosx-10.6-intel.egg-tmp/PIL/_imagingtk.so
  Reason: image not found

任何想法都将不胜感激!

0 个答案:

没有答案