<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。
    這是我最近在學習python的一絲體會,好多lib都無法通過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

    結果,居然:
     _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包我已經安裝了,查看setup.py代碼,發現:
    # 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 閱讀(3113) 評論(1)  編輯  收藏 所屬分類: python

    Feedback

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

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

    主站蜘蛛池模板: 午夜免费啪视频在线观看| 亚洲国产成人无码AV在线| a毛片久久免费观看| 亚洲视频在线免费| 日韩精品视频在线观看免费| 日韩一区二区免费视频| 亚洲第一街区偷拍街拍| 国产在线19禁免费观看国产| 亚洲AV综合色区无码一二三区| 国产精品国产自线拍免费软件| 日本亚洲中午字幕乱码| 亚洲高清免费视频| 久久久久久久久久免免费精品 | 亚洲av麻豆aⅴ无码电影| 国产偷国产偷亚洲高清在线| 日韩精品电影一区亚洲| 精品国产福利尤物免费| 亚洲AV无码国产丝袜在线观看 | 国产精品二区三区免费播放心| 美女黄色免费网站| 亚洲欧洲日产国码无码网站| 日韩免费电影网址| 亚洲无圣光一区二区| 四虎影院免费在线播放| 免费在线观看一区| 亚洲国产精品自在在线观看| 免费能直接在线观看黄的视频| 亚洲日本VA午夜在线电影| 四虎亚洲国产成人久久精品 | 精品亚洲AV无码一区二区三区 | 好久久免费视频高清| 亚洲成a人片77777群色| 免费人成视频在线观看不卡| 在线观看免费视频网站色| 亚洲天堂一区二区三区| 免费人成在线观看网站视频| 无码国产精品一区二区免费vr| 国产精品亚洲综合久久| 国产亚洲精品自在线观看| 国产四虎免费精品视频| 四虎影视永久在线精品免费|