SO に関する多くの質問、および Web 上のフォーラムやブログの投稿があることは知っていますが、同じ問題に遭遇し続けています。アプリ エンジン イメージング API に使用するために PIL をインストールしようとしています。APIの概要で、Google はpythonmac.orgからインストールすることを提案しています。
そこで提供されているdmgをインストールしようとすると、システムpythonとしてpython 2.5をインストールする必要があることがわかります。このエラーについて少しグーグルで調べたところ、この SO の質問が表示されました: How to install PIL on Mac OSX 10.5.8 for Google App Engine? . そのための最初の答えでは、ステップ1を実行し、macportsをインストールしました。次に、ステップ 2 で実行するように指示されましたsudo port install python25
。
これにより、次のエラーが発生しました。
Error: org.macports.activate for port expat returned: Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port. Unable to activate port expat. Use 'port -f activate expat' to force the activation.
Error: Failed to install expat
Please see the log file for port expat for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_expat/expat/main.log
Error: The following dependencies were not installed: gettext expat libiconv ncurses libedit openssl zlib python_select sqlite3
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port python25 failed
macports の完全な出力については、このペーストビンを参照してください
それがうまくいかなかったとき、もう少しグーグルでこのブログ投稿にたどり着きました。それが示唆するように、libjpegをインストールしました。提案されている次の手順は次のとおりです。
http://effbot.org/downloads/Imaging-1.1.7.ta r.gz から PIL をダウンロードします。(既にインストールされている場合は、最初に PIL を削除します。)
解凍したフォルダー: python setup.py build --force sudo python setup.py install
しかし、python setup.py build --force を実行しようとすると、次のエラーが発生しました。
_imaging.c:3017: warning: initialization from incompatible pointer type
_imaging.c:3077: warning: initialization from incompatible pointer type
lipo: can't figure out the architecture type of: /var/folders/q_/wgr019b53rx9b2lr3y7867bm0000gn/T//ccJY6hPI.out
error: command 'gcc-4.2' failed with exit status 1
完全な出力については、このペーストビンを確認してください。
他にも試したことがいくつかあり、それらを編集しますが、これをできるだけ早く投稿したいと思います。事前にthx。