<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 閱讀(3115) 評論(1)  編輯  收藏 所屬分類: python

    Feedback

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

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

    主站蜘蛛池模板: 狼群影院在线观看免费观看直播| 亚洲成a人在线看天堂无码| 成人毛片免费观看| 久久精品国产亚洲Aⅴ蜜臀色欲| 亚洲无码在线播放 | 国产亚洲精品不卡在线| 欧美亚洲精品一区二区| 日韩视频免费在线| 国产亚洲精品第一综合| 99久久久国产精品免费牛牛四川| 成年女人毛片免费播放人| 亚洲一区二区三区久久| 女性自慰aⅴ片高清免费| 亚洲成a人无码亚洲成av无码 | 成人A片产无码免费视频在线观看 成人电影在线免费观看 | 91热久久免费精品99| 亚洲日本va午夜中文字幕一区| 久久精品电影免费动漫| 亚洲精品国产福利在线观看| 无码免费又爽又高潮喷水的视频| 天堂亚洲免费视频| 国产免费久久精品99久久| 成人激情免费视频| 偷自拍亚洲视频在线观看99| 亚洲日韩国产成网在线观看| 久久久久久免费一区二区三区| 亚洲国产精品久久久久网站| 久草在视频免费福利| 久久夜色精品国产噜噜噜亚洲AV| 永久免费在线观看视频| 亚洲日韩av无码中文| 麻豆高清免费国产一区| 亚洲人成未满十八禁网站| 亚洲欧洲日产国码高潮αv| 免费av一区二区三区| 久久久久亚洲国产| 亚洲一级特黄大片在线观看| 久久精品免费一区二区三区| 国产亚洲精aa在线看| 亚洲中文字幕久久精品无码APP | 最新亚洲春色Av无码专区|