python ImageTk.PhotoImage - 段错误 [英] python ImageTk.PhotoImage - segfault
本文介绍了python ImageTk.PhotoImage - 段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在 Mac 10.6.8 上运行以下命令:
I am trying to run the following command on a Mac 10.6.8:
Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul 27 2011, 14:50:45)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
<小时>
import Image
import ImageTk
from Tkinter import Tk
window = Tk()
i = Image.open("file.jpg")
photo = ImageTk.PhotoImage(i)
Segmentation fault
我见过其他人在这种情况下遇到了总线错误.有没有人知道这里的错误或绕过它的方法?我无法理解 http://infohost.nmt.edu/tcc/help/pubs/pil/image-tk.html 是相关的.谢谢!
I've seen others have had a bus error in this situation. Does anyone know of a bug here or a way round it? I couldn't understand whether http://infohost.nmt.edu/tcc/help/pubs/pil/image-tk.html was relevant. Thanks!
很抱歉,即使在升级 EPD 后也会发生同样的事情:
I'm sorry to say the same thing happens even after upgrading EPD:
Python 2.7.2 |EPD 7.2-2 (64-bit)| (default, Sep 7 2011, 16:31:15)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
推荐答案
现在固定在
Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
这篇关于python ImageTk.PhotoImage - 段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文