2011-08-03 14 views
2

私はGoogle App Engineの世界で初めてです。GAE for Lionを使用したPythonの設定

GAE用の世界的なPythonプロジェクトをローカルでセットアップしようとすると、GAEがどのようにPython 2.7をサポートしていないのかに関するエラーが発生します。

デフォルトのシステムの代わりに/usr/local/python-2.5にある私のカスタムPython 2.5のインストールを指すようにGAEをローカルに設定するにはどうすればよいですか? (ライオンと2.7)

私のシステム構成:私はアプリを実行しようとすると、私は私のコンソールで見ている

OS: Mac OS 10.7 
GoogleAppEngineLauncher: 1.5.2 

エラー:ランチャーで

*** Running dev_appserver with the following flags: 
    --admin_console_server= --port=8080 
Python command: /usr/bin/python2.6 
Warning: You are using a Python runtime (2.6) that is more recent than the production runtime environment (2.5). Your application may use features that are not available in the production environment and may not work correctly when deployed to production. 
WARNING 2011-08-02 23:53:51,987 datastore_file_stub.py:511] Could not read datastore data from /var/folders/08/jlb1tb7s3hq1jhh9qzxfpqbw0000gn/T/dev_appserver.datastore 
INFO  2011-08-02 23:53:51,989 rdbms_sqlite.py:58] Connecting to SQLite database '' with file '/var/folders/08/jlb1tb7s3hq1jhh9qzxfpqbw0000gn/T/dev_appserver.rdbms' 
WARNING 2011-08-02 23:53:51,995 dev_appserver.py:4749] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging 
INFO  2011-08-02 23:53:52,052 dev_appserver_multiprocess.py:637] Running application helloworld on port 8080: http://localhost:8080 
INFO  2011-08-02 23:54:15,229 dev_appserver_main.py:667] Server interrupted by user, terminating 
+0

をあなたは、Python 2.5のカスタムが必要なのはなぜ? AppleはPython 2.5 for Lionも含んでいます: '/ usr/bin/python2.5' –

+0

私はGAEとPython 2.7に全く問題はなく、正式に"すぐに "サポートするつもりです。 Python 2.5の機能だけを使用している限り、警告にもかかわらず動作しないのでしょうか? – agf

+0

私は、コンソールのエラーを見るのが悪いと思っていました。私はGAEが野生で使用するのと同じPythonバージョンに固執しようとしていました。 –

答えて

1

、上をクリックGoogleAppEngineLauncher -> Preferencesと入力し、 'Python Path'というフィールドにPythonバイナリへのパスを入力します。

+0

ああこれです!私はまだpythonのバージョンのエラーを除いて、上記と同じエラーが発生しています。彼らは無視すべきでしょうか? –

+0

どのようなエラーがありますか?私は警告だけを見る。 –

+0

あなたはそうです - 彼らは情報/警告メッセージです。私はすぐにすべての出力が悪いと推測しました。 –

2

GAE SDKとPython 2.7を使用する最も簡単な方法は、Macのポート(http://www.macports.org/)をインストールし、そこからpython 2.7をインストールすることです。 Googleappenginelauncherメニュー、オープン環境から次に

$ sudo port install python27 # To install python 2.7 

をし、Pythonのパスフィールドに/opt/local/bin/python2.7を置く:

は、一度インストールmacport。

はPILをインストールするか、例えばlxmlのは、ちょうどシェルで次のコマンドを入力します。

# For PIL 
$ sudo port install py27-pil 

# For Lxml 
$ sudo port install py27-lxml 
関連する問題