在 Mac 上为 PyDev 配置 App Engine 路径
我刚刚在 Mac (OS X 10.6.6) 上安装了 Eclipse 和 Pydev 插件,但在使用 Google App Engine 项目“模板”时遇到问题。我真的被困在这里所以非常感谢您的帮助。
我最多可以添加一个新项目>派德夫> Pydev Google App Engine 项目并设置项目名称、目录和类型等没有问题。
然后它要求 Google App Engine 目录“选择 Google App Engine 根目录(包含 dev_appserver.py、appcfg.py、lib 等的目录”),但我在任何地方都找不到这些文件。我当然已经安装了 Google App引擎 SDK。
我确实找到了一篇文章,说我应该指定以下路径:
"/Applications/**GoogleAppEngineLauncher.app**/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/"
注意此路径包含一个 .app 文件(!?)。我尝试导航此结构,但可以找到 GoogleAppEngineLauncher.app 文件。 什至尝试直接将路径粘贴到对话框中...
我做错了什么?
我
I've just installed Eclipse and the Pydev plug-in on my Mac (OS X 10.6.6) and I'm having trouble using the Google App Engine project 'template'. I'm really stuck here so your help would be really appreciated.
I can get as far as adding a New Project > Pydev > Pydev Google App Engine Project and setup the project name, directory and type etc no problem.
It then asks for the Google App Engine directory "Select the Google App Engine root directory (dir containing dev_appserver.py, appcfg.py, lib etc" but I can't find these files anywhere. I have of course already installed the Google App Engine SDK.
I did find a post that says I should specify the following path:
"/Applications/**GoogleAppEngineLauncher.app**/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/"
Notice this path includes a .app file (!?). I tried to navigate this structure and I can find the GoogleAppEngineLauncher.app file but can't navigate into it. I even tried pasting the path into the dialog directly... no luck.
What am I doing wrong? Help!
Yours, Confoosed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将
/usr/local/google_appengine
作为 ${GOOGLE_APP_ENGINE} 的路径,Eclipse 会将该符号链接解析为/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents /Resources/google_appengine
。您应该能够在 Eclipse 下看到 /usr 文件夹,而您通常在 Finder 下看不到该文件夹。
Put
/usr/local/google_appengine
as the path to ${GOOGLE_APP_ENGINE} and Eclipse will resolve that symlink to/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
.You should be able to see the /usr folder under Eclipse, which you normally won't see under Finder.
我也遇到了同样的问题,并且被困了好几天。我只是在 Finder 中搜索 dev_appserver.py 文件并插入该目录。我的文件夹就在我最初在桌面上指向的文件夹下,我浪费时间在应用程序文件夹中查找。我希望这会有所帮助,尽管只需在整个目录系统中搜索该文件非常简单。
我在 Mac OS X 上下载了这个适用于 Python 的 AppEngine SDK,看起来它只是一个 SDK,没有我们需要的库目录。
祝你好运,
I had the same problem and I was stuck for days. I simply searched for the dev_appserver.py file in the Finder and inserted that dir. Mine was just under the folder I initially pointed it toward on my Desktop and I was wasting time looking in the App folder. I hope that helps, even though its so simple to just search your whole dir sys for the file.
I had downloaded this AppEngine SDK for Python on Mac OS X and it seemed like it was just the SDK without the dir that we need for the lib.
Good luck,
您需要下载并运行 Google App Engine SDK for Python(Mac OS X 上的 AppEngine SDK for Python 可以在该链接中找到),并且您需要运行安装程序。它将在
/usr/local/bin/
中安装 dev_appserver 二进制文件。您不应该尝试运行捆绑的代码;需要在安装程序中运行并将代码安装在/usr/local/bin/
中的原因之一是安装程序还会定期更新已安装的文件;如果您直接从捆绑包中运行它们,那么您将面临运行这些文件的过时版本的风险。You need to download and run the Google App Engine SDK for Python (the AppEngine SDK for Python on Mac OS X may be found at that link), and you need to run the installer program. It will install the dev_appserver binary in
/usr/local/bin/
. You shouldn't try running the bundled code; one of the reasons why it is necessary to run in the installer and have it install the code in/usr/local/bin/
, is that the installer will also periodically update those files which it has installed; if you run them directly from within the bundle, then you risk running out-of-date versions of those files.