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

    Feedback

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

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

    主站蜘蛛池模板: 免费a级毛片18以上观看精品| 亚洲成av人片一区二区三区| 亚洲人成无码网WWW| 国产大片91精品免费观看不卡| 免费看香港一级毛片| 自拍偷自拍亚洲精品第1页| 亚洲国产高清美女在线观看| 四虎国产精品永免费| 久久福利资源网站免费看| 亚洲日本中文字幕天堂网| 亚洲一区电影在线观看| 一区二区三区在线观看免费| 无人在线直播免费观看| 亚洲中文字幕久久精品无码APP| 亚洲国产最大av| 国产猛男猛女超爽免费视频| 国产高清免费在线| 亚洲美女大bbbbbbbbb| 一级A毛片免费观看久久精品| 999久久久免费精品国产| 一本色道久久综合亚洲精品| 亚洲精品美女久久久久久久| 黄网站色视频免费观看45分钟 | 无码精品A∨在线观看免费| 亚洲综合国产精品第一页| 亚洲一区二区久久| a毛片视频免费观看影院| 国产伦精品一区二区三区免费下载| 77777_亚洲午夜久久多人| 一区二区3区免费视频| 美女被免费视频网站a国产| 亚洲毛片无码专区亚洲乱| 两个人看的www视频免费完整版| 日韩一区二区三区免费体验| 亚洲第一页中文字幕| a在线观看免费视频| 亚洲男人的天堂一区二区| 亚洲AV综合色区无码一二三区| 2015日韩永久免费视频播放| 亚洲日韩精品无码一区二区三区 | 亚洲免费日韩无码系列|