<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    stone2083

    ubuntu下安裝Python Imaging Library (PIL)

    easy_install is not so easy。
    這是我最近在學(xué)習(xí)python的一絲體會,好多l(xiāng)ib都無法通過easy_install安裝,比如:Python Imaging Library (PIL)

    只能通過手工安裝方式安裝:
    *download the pil_1.1.6
    *tar xvf Imaging-1.1.6.tar.gz & chmox +x setup.py
    *python setup.py build

    結(jié)果,居然:
     _imagingtk.c -o build/temp.linux-i686-2.6/_imagingtk.o
    _imagingtk.c:
    20:16: error: tk.h: No such file or directory
    _imagingtk.c:
    23: error: expected ‘)’ before ‘*’ token
    _imagingtk.c:
    31: error: expected specifier-qualifier-list before ‘Tcl_Interp’
    _imagingtk.c: In function ‘_tkinit’:
    _imagingtk.c:
    37: error: ‘Tcl_Interp’ undeclared (first use in this function)
    _imagingtk.c:
    37: error: (Each undeclared identifier is reported only once
    _imagingtk.c:
    37: error: for each function it appears in.)
    _imagingtk.c:
    37: error: ‘interp’ undeclared (first use in this function)
    _imagingtk.c:
    45: error: expected expression before ‘)’ token
    _imagingtk.c:
    51: error: ‘TkappObject’ has no member named ‘interp’
    _imagingtk.c:
    55: warning: implicit declaration of function ‘TkImaging_Init’
    error: command 'gcc' failed with exit status 
    1

    tk.h No such file or directory

    事實上,tk-dev包我已經(jīng)安裝了,查看setup.py代碼,發(fā)現(xiàn):
    # Library pointers.
    #
    #
     Use None to look for the libraries in well-known library locations.
    #
     Use a string to specify a single directory, for both the library and
    #
     the include files.  Use a tuple to specify separate directories:
    #
     (libpath, includepath).  Examples:
    #
    #
     JPEG_ROOT = "/home/libraries/jpeg-6b"
    #
     TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
    #
    #
     If you have "lib" and "include" directories under a common parent,
    #
     you can use the "libinclude" helper:
    #
    #
     TIFF_ROOT = libinclude("/opt/tiff")

    FREETYPE_ROOT 
    = None
    JPEG_ROOT 
    = None
    TIFF_ROOT 
    = None
    ZLIB_ROOT 
    = None
    TCL_ROOT 
    = None

    將TCL_ROOT = None 修改成:TCL_ROOT = '/usr/include/tk',即可

    python setup.py build
    python setup.py install

    成功 :)

    posted on 2009-10-27 17:25 stone2083 閱讀(3105) 評論(1)  編輯  收藏 所屬分類: python

    Feedback

    # re: ubuntu下安裝Python Imaging Library (PIL) 2010-11-05 06:52 cyc

    我提示的錯誤和你不一樣,是gcc無法編譯。。。唉。。
    郁悶啊  回復(fù)  更多評論   

    主站蜘蛛池模板: 国产乱妇高清无乱码免费| 韩国免费A级毛片久久| 十八禁视频在线观看免费无码无遮挡骂过| 18以下岁毛片在免费播放| 国产成人涩涩涩视频在线观看免费 | 国产成人精品日本亚洲18图| 特级毛片爽www免费版| 久久久久久国产精品免费无码 | 亚洲人JIZZ日本人| 亚洲综合成人婷婷五月网址| 国产在线观看无码免费视频| 午夜色a大片在线观看免费| 国产v亚洲v天堂无码网站| 亚洲第一男人天堂| 最近免费字幕中文大全| 在线播放免费人成视频在线观看 | 无码一区二区三区亚洲人妻| 一区二区在线免费观看| yy6080久久亚洲精品| 99999久久久久久亚洲| 最好免费观看高清在线| 又黄又爽一线毛片免费观看 | 国产精品免费久久久久影院| 女性无套免费网站在线看| 精品亚洲一区二区| 羞羞视频免费观看| 亚洲天堂免费在线| 亚洲av福利无码无一区二区| 免费人成在线观看播放a| 无限动漫网在线观看免费| 亚洲Av永久无码精品三区在线 | 亚洲欧美aⅴ在线资源| 一级毛片免费毛片一级毛片免费 | 亚洲欧洲自拍拍偷精品 美利坚| 亚洲大成色www永久网址| 蜜桃成人无码区免费视频网站 | 亚洲综合精品网站| 亚洲女子高潮不断爆白浆| 黄+色+性+人免费| 久久综合日韩亚洲精品色| 国产免费福利体检区久久|