virtualenv: PIL はaptでいれるよ。(Debian/Squeeze)

(openid)hdknr@debsq:~$ pip install PIL
Downloading/unpacking PIL
  Downloading PIL-1.1.7a2-py2.5-macosx10.5.mpkg.zip (1.2Mb): 1.2Mb downloaded
  Running setup.py egg_info for package PIL
    Traceback (most recent call last):
      File "<string>", line 13, in <module>
    IOError: [Errno 2] No such file or directory: ‘/home/hdknr/.virtualenvs/openid/build/PIL/setup.py’
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 13, in <module>

IOError: [Errno 2] No such file or directory: ‘/home/hdknr/.virtualenvs/openid/build/PIL/setup.py’

—————————————-
Command python setup.py egg_info failed with error code 1
Storing complete log in ./pip-log.txt
Traceback (most recent call last):
  File "/home/hdknr/.virtualenvs/openid/bin/pip", line 5, in <module>
    pkg_resources.run_script(‘pip==0.4’, ‘pip’)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 448, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1166, in run_script
    execfile(script_filename, namespace, namespace)
  File "/home/hdknr/.virtualenvs/openid/lib/python2.5/site-packages/pip-0.4-py2.5.egg/EGG-INFO/scripts/pip", line 3, in <module>
    pip.main()
  File "/home/hdknr/.virtualenvs/openid/lib/python2.5/site-packages/pip-0.4-py2.5.egg/pip.py", line 926, in main
    return command.main(initial_args, args[1:], options)
  File "/home/hdknr/.virtualenvs/openid/lib/python2.5/site-packages/pip-0.4-py2.5.egg/pip.py", line 289, in main
    log_fp = open_logfile_append(log_fn)
  File "/home/hdknr/.virtualenvs/openid/lib/python2.5/site-packages/pip-0.4-py2.5.egg/pip.py", line 3812, in open_logfile_append
    log_fp = open(filename, ‘a’)
IOError: [Errno 13] Permission denied: ‘./pip-log.txt’

(openid)hdknr@debsq:~$ easy_install PIL
Searching for PIL
Reading http://pypi.python.org/simple/PIL/
Reading http://www.pythonware.com/products/pil
Reading http://effbot.org/zone/pil-changes-115.htm
Reading http://effbot.org/downloads/#Imaging
No local packages or download links found for PIL
error: Could not find suitable distribution for Requirement.parse(‘PIL’)

http://www.pythonware.com/products/pil/ からソースを落としてみる。

(openid)hdknr@debsq:~$ easy_install PIL
Searching for PIL
Reading http://pypi.python.org/simple/PIL/
Reading http://www.pythonware.com/products/pil
Reading http://effbot.org/zone/pil-changes-115.htm
Reading http://effbot.org/downloads/#Imaging
No local packages or download links found for PIL
error: Could not find suitable distribution for Requirement.parse(‘PIL’)
(openid)hdknr@debsq:~$ wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
–2009-09-28 15:58:33–  http://effbot.org/downloads/Imaging-1.1.6.tar.gz
effbot.org をDNSに問いあわせています… 67.15.84.19
effbot.org|67.15.84.19|:80 に接続しています… 接続しました。
HTTP による接続要求を送信しました、応答を待っています… 301 Moved Permanently
場所: /media/downloads/Imaging-1.1.6.tar.gz [続く]
–2009-09-28 15:58:38–  http://effbot.org/media/downloads/Imaging-1.1.6.tar.gz
effbot.org|67.15.84.19|:80 に接続しています… 接続しました。
HTTP による接続要求を送信しました、応答を待っています… 200 OK
長さ: 435854 (426K) [application/x-gzip]
`Imaging-1.1.6.tar.gz’ に保存中

100%[=======================================================================================>] 435,854     53.2K/s 時間 11s

2009-09-28 15:58:50 (38.4 KB/s) – `Imaging-1.1.6.tar.gz’ へ保存完了 [435854/435854]

(openid)hdknr@debsq:~$ tar xfz Imaging-1.1.6.tar.gz

(openid)hdknr@debsq:~$ cd Imaging-1.1.6/

hdknr@debsq:~/Imaging-1.1.6$ python setup.py install
running install
running build
running build_py
running build_ext
building ‘_imaging’ extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -IlibImaging -I/home/hdknr/.virtualenvs
/openid/include -I/usr/local/include -I/usr/include -I/usr/include/python2.5 -c _imaging.c -o build/temp.linux-i686-2.5/_imaging.
o
_imaging.c:76:20: error: Python.h: そのようなファイルやディレクトリはありません
In file included from libImaging/Imaging.h:14,
                 from _imaging.c:78:
libImaging/ImPlatform.h:14:2: error: #error Sorry, this library requires support for ANSI prototypes.
libImaging/ImPlatform.h:17:2: error: #error Sorry, this library requires ANSI header files.
libImaging/ImPlatform.h:55:2: error: #error Cannot find required 32-bit integer type
In file included from _imaging.c:78:
libImaging/Imaging.h:90: error: expected specifier-qualifier-list before ‘INT32’
libImaging/Imaging.h:265: error: expected specifier-qualifier-list before ‘INT32’
libImaging/Imaging.h:393: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ImagingCRC32’
_imaging.c:123: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_imaging.c:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
_imaging.c:141: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_imaging.c:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
_imaging.c:152: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_imaging.c:158: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
_imaging.c:163: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_imaging.c:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
_imaging.c:170: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c: In function ‘_dealloc’:
_imaging.c:201: error: ‘ImagingObject’ has no member named ‘image’
_imaging.c:202: warning: implicit declaration of function ‘PyMem_DEL’
_imaging.c: At top level:
_imaging.c:207: error: expected ‘)’ before ‘*’ token
_imaging.c: In function ‘ImagingSectionEnter’:
_imaging.c:225: error: ‘PyThreadState’ undeclared (first use in this function)
_imaging.c:225: error: (Each undeclared identifier is reported only once
_imaging.c:225: error: for each function it appears in.)
_imaging.c:225: error: expected expression before ‘)’ token
_imaging.c: In function ‘ImagingSectionLeave’:
_imaging.c:232: warning: implicit declaration of function ‘PyEval_RestoreThread’
_imaging.c:232: error: ‘PyThreadState’ undeclared (first use in this function)
_imaging.c:232: error: expected expression before ‘)’ token
_imaging.c: In function ‘ImagingError_IOError’:
_imaging.c:253: warning: implicit declaration of function ‘PyErr_SetString’
_imaging.c:253: error: ‘PyExc_IOError’ undeclared (first use in this function)
_imaging.c:254: error: ‘NULL’ undeclared (first use in this function)
_imaging.c: In function ‘ImagingError_MemoryError’:
_imaging.c:260: warning: implicit declaration of function ‘PyErr_NoMemory’
_imaging.c:260: warning: return makes pointer from integer without a cast
_imaging.c: In function ‘ImagingError_Mismatch’:
_imaging.c:266: error: ‘PyExc_ValueError’ undeclared (first use in this function)
_imaging.c:267: error: ‘NULL’ undeclared (first use in this function)
_imaging.c: In function ‘ImagingError_ModeError’:
_imaging.c:273: error: ‘PyExc_ValueError’ undeclared (first use in this function)
_imaging.c:274: error: ‘NULL’ undeclared (first use in this function)
_imaging.c: In function ‘ImagingError_ValueError’:
_imaging.c:281: error: ‘PyExc_ValueError’ undeclared (first use in this function)
_imaging.c:284: error: ‘NULL’ undeclared (first use in this function)
_imaging.c: At top level:
_imaging.c:316: error: expected ‘)’ before ‘*’ token
_imaging.c:413: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:468: error: expected ‘)’ before ‘*’ token
_imaging.c:536: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:568: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:580: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:592: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:604: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:613: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:624: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token

_imaging.c: In function ‘_font_dealloc’:
_imaging.c:2035: warning: implicit declaration of function ‘Py_XDECREF’
_imaging.c:2035: error: ‘ImagingFontObject’ has no member named ‘ref’
_imaging.c: In function ‘textwidth’:
_imaging.c:2045: error: ‘ImagingFontObject’ has no member named ‘glyphs’
_imaging.c: At top level:
_imaging.c:2050: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:2098: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:2108: error: array type has incomplete element type
_imaging.c:2109: error: ‘PyCFunction’ undeclared here (not in a function)
_imaging.c:2109: error: expected ‘}’ before ‘_font_getmask’
_imaging.c:2110: error: expected ‘}’ before ‘_font_getsize’
_imaging.c:2111: error: ‘NULL’ undeclared here (not in a function)
_imaging.c:2114: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c:2122: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_imaging.c: In function ‘_draw_dealloc’:
_imaging.c:2150: error: ‘ImagingDrawObject’ has no member named ‘image’
_imaging.c: At top level:
_imaging.c:3138: warning: return type defaults to ‘int’
_imaging.c: In function ‘DL_EXPORT’:
_imaging.c:3138: error: expected declaration specifiers before ‘init_imaging’
_imaging.c:3149: error: expected ‘{’ at end of input
error: command ‘gcc’ failed with exit status 1

(openid)hdknr@debsq:~$ sudo aptitude install python-imaging
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
拡張状態情報を読み込んでいます
パッケージの状態を初期化しています… 完了
タスクの記述を読み込んでいます… 完了
以下の新規パッケージがインストールされます:
  python-imaging
更新: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
396kB のアーカイブを取得する必要があります。展開後に 1,364kB のディスク領域が新たに消費されます。
拡張状態情報を書き込んでいます… 完了
取得:1 http://ftp.jp.debian.org squeeze/main python-imaging 1.1.6-3.1 [396kB]
396kB を 13s 秒でダウンロードしました (29.8kB/s)
未選択パッケージ python-imaging を選択しています。
(データベースを読み込んでいます … 現在 30977 個のファイルとディレクトリがインストールされています。)
(…/python-imaging_1.1.6-3.1_i386.deb から) python-imaging を展開しています…
python-imaging (1.1.6-3.1) を設定しています …
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
拡張状態情報を読み込んでいます
パッケージの状態を初期化しています… 完了
拡張状態情報を書き込んでいます… 完了
タスクの記述を読み込んでいます… 完了

カテゴリー: 未分類 パーマリンク

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中