Setting Google App Engine in Mac OS X snow leopard [failed]

Source: Internet
Author: User

1. Download Google App Engine SDK for Python: http://code.google.com/intl/zh-CN/appengine/docs/python/gettingstarted/devenvironment.html here.

Do not run googleappenginelauncher immediately after the download, but put it in a directory. My directory is \ googleappengine.

2. Google App Engine SDK requires the runtime environment of Python 2.5.2. Snow Leopard has built-in python. Input python in terminal to view the version information, 2.6.x, which cannot be used.

Fortunately, Python 2.5 is retained in Mac, but it is not the default version.

3. Complete Python 2.5 in Mac.

3.1 search and download jpegsrc.v7.tar.gz, unzip and the jpeg-7 folder appears.

In terminal:

$ Jpeg-7 CD

$ Export cc =/usr/bin/gcc-4.0

$./Configure -- enable-shared -- enable-static

$ Make

$ Sudo make install

3.2 search and download imaging-1.1.6.tar.gz. After decompression, the imaging-1.1.6 folder appears.

In terminal:

$ CD image-1.1.6

Modify cmd_root in setup. py to cmd_root = "/usr/local/lib"

$/Usr/bin/python2.5 setup. py build

$ Sudo/usr/bin/python2.5 setup. py install

After completing the above steps, I ran/usr/bin/python2.5 and found that the version is 2.5.4, which is a little bigger than the 2.5.2 version required by Google App Engine. I hope there is no problem.

4. Run googleappenginelauncher. During the first running, you will be asked if you want to make symlinks and select No.

5. Go to preference, set the python path to/usr/bin/python2.5, press enter (otherwise it is invalid), close the window, and exit googleappenginelauncher.

(Equivalent to inputting in TerminalDefaults write com. Google. googleappenginelauncher Python/usr/bin/python2.5)

6. Open googleappenginelauncher again, and then select make symlinks in the menu...

Complete. However, the following error occurs when you run helloworld. After searching, many people have this problem. Someone on the Gae official site returned a similar problem http://code.google.com/p/googleappengine/issues/detail? Id = 3170.

* ** Running dev_appserver with the following flags:

-- Admin_console_server = -- Port = 8080.

Python command:/usr/bin/python2.5

Traceback (most recent call last ):

File "/googleappengine/googleappenginelauncher. APP/contents/resources/GoogleAppEngine-default.bundle/contents/resources/google_appengine/dev_appserver.py", line 69, in <module>

Run_file (_ file __, globals ())

File "/googleappengine/googleappenginelauncher. APP/contents/resources/GoogleAppEngine-default.bundle/contents/resources/google_appengine/dev_appserver.py", line 65, in run_file

Execfile (script_path, globals _)

File "/googleappengine/googleappenginelauncher. APP/contents/resources/GoogleAppEngine-default.bundle/contents/resources/google_appengine/Google/appengine/tools/dev_appserver_main.py", line 461, in <module>

SYS. Exit (main (SYS. argv ))

File "/googleappengine/googleappenginelauncher. APP/contents/resources/GoogleAppEngine-default.bundle/contents/resources/google_appengine/Google/appengine/tools/dev_appserver_main.py", line 404, in Main

Config, matcher = dev_appserver.loadappconfig (root_path ,{})

File "/googleappengine/googleappenginelauncher. APP/contents/resources/GoogleAppEngine-default.bundle/contents/resources/google_appengine/Google/appengine/tools/dev_appserver.py", line 3481, in loadappconfig

Raise appconfignotfounderror

Google. appengine. Tools. dev_appserver.appconfignotfounderror

Refer to the following for conversion from: http://practicalappengine.blogspot.com/2010/01/mac-snow-leopard-google-app-engine.html

Author:Ericsk

[Mac] Developing Google App Engine on snow leopard After snow leopard (10.6), Mac OSX has set the python set to 2.6, but the system still has the version of server guard 2.5, therefore, there are basically no issues in development, but some tuning is required:

  1. If your computer has not installed xcode (both in Mac OS and in iPhone SDK), you must install it first, tools to ensure system security
  2. Although Python 2.5 is built in the system, there is no handler for installing Pil, because the image API in App Engine will use Pil, therefore, we need to install this function. To enable the handler to support the processing of JPEG cases, you must first install libjpeg.
  3. First, go down hereJpegsrc.v7.tar.gzThen, in text mode, follow the steps below to renew the hosts and security:


    $ Tar zxvf restart src.v7.tar.gz
    ....
    $ Jpeg-7 CD
    $ Export cc =/usr/bin/gcc-4.0
    $./Configure -- enable-shared -- enable-static
    $ Make
    $ Sudo make install

  4. if everything is very profitable, then you can download Python imaging library 1.1.6 source kit original response example:


    $ tar zxvf Imaging-1.1.6.tar.gz
    ...
    $ CD imaging-1.1.6
    # Set up later. in The py case, find the cmd_root and change it to cmd_root = "/usr/local/lib"
    $/usr/bin/python2.5 setup. PY build
    $ sudo/usr/bin/python2.5 setup. PY install


If everything has no problem, then there should be no problem. Just remember that when you are in an animationDev_appserver.pyTo use/Usr/bin/python2.5Instead of using/Usr/bin/PythonAvoid using Python 2.6.

If yesGoogleappenginelauncher. appYou can set the path of python in preferences.../Usr/bin/python2.5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.