2012-01-06 7 views
1

build、build_ext -i、installを実行して、CentOS 6.2 for Python 2.7にPILをビルドしてインストールしました。すべてのサポートが提供されるように、ライブラリパスを変更する必要がありました。 selftest.pyを実行すると、すべてが正常であり、すべてのサポート(特にJPEG)が指定されていることがわかります。CentOSの下でのPILインストールselftest fineしかしjpegが動作しない

JPEGを開き、私のプログラムを実行している、何かを追加し、それは私がエラーを取得し保存します。

File "/opt/python2.7.2/lib/python2.7/site-packages/PIL/Image.py", line 401, in _getencoder 
    raise IOError("encoder %s not available" % encoder_name) 
IOError: encoder jpeg not available 

私のプログラムは、他のシステムで正常に動作し、私はそれを変更する場合には、CentOSのマシンの罰金に動作します〜pngにpython2.7ですべてのコマンドを実行しましたが、すでにPILを再インストールしようとしました。

要するに、PILをインストールする前に、セルフテストが正常に実行されますが、インストール後にはそれ以上動作しません。

答えて

2

私はubuntu forums

1/ Call 'pip install -I pil --no-install' to download and unpack the PIL source into your 
build directory; 
2/ Get into your build directory and edit setup.py; 
3/ Find the line that says 'add_directory(library_dirs, "/usr/lib")' (line 214 here); 
4/ Add the line 'add_directory(library_dirs, "/usr/lib/i386-linux-gnu")' afterwards; 
5/ Call 'pip install -I pil --no-download' to finish the installation. 
で解決策を見つけた
関連する問題