eclipse 在 Mac 上为 PyDev 配置 App Engine 路径
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4911823/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Configuring App Engine path for PyDev on Mac
提问by ConfusedNoob
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.
我刚刚在 Mac (OS X 10.6.6) 上安装了 Eclipse 和 Pydev 插件,但在使用 Google App Engine 项目“模板”时遇到了问题。我真的被困在这里,所以你的帮助将不胜感激。
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.
我可以添加一个新项目> Pydev > Pydev Google App Engine 项目并设置项目名称、目录和类型等没问题。
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.
然后它会询问 Google App Engine 目录“选择 Google App Engine 根目录(包含 dev_appserver.py、appcfg.py、lib 等的目录”,但我在任何地方都找不到这些文件。我当然已经安装了 Google App引擎 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.
请注意,此路径包含一个 .app 文件 (!?)。我试图导航这个结构,我可以找到 GoogleAppEngineLauncher.app 文件,但无法导航到它。我什至尝试将路径直接粘贴到对话框中……不走运。
What am I doing wrong? Help!
我究竟做错了什么?帮助!
Yours, Confoosed.
你的,糊涂了。
回答by Y.H Wong
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
.
将其/usr/local/google_appengine
作为 ${GOOGLE_APP_ENGINE} 的路径,Eclipse 会将该符号链接解析为/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.
您应该能够在 Eclipse 下看到 /usr 文件夹,而在 Finder 下通常不会看到该文件夹。
回答by Adil Minhas
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.
我遇到了同样的问题,我被困了好几天。我只是在 Finder 中搜索 dev_appserver.py 文件并插入该目录。我的就在我最初在桌面上指向的文件夹下,我浪费时间在 App 文件夹中查找。我希望这会有所帮助,即使只是在整个 dir sys 中搜索文件是如此简单。
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.
我已经在 Mac OS X 上下载了这个适用于 Python 的 AppEngine SDK,它似乎只是没有我们需要的 lib 目录的 SDK。
Good luck,
祝你好运,
回答by Michael Aaron Safyan
You need to download and run the Google App Engine SDK for Python(the AppEngine SDK for Python on Mac OS Xmay 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.
您需要下载并运行Google App Engine SDK for Python(Mac OS X 上的AppEngine SDK for Python可在该链接中找到),并且您需要运行安装程序。它将安装 dev_appserver 二进制文件/usr/local/bin/
。你不应该尝试运行捆绑的代码;必须在安装程序中运行并让它安装代码的原因之一是/usr/local/bin/
安装程序还会定期更新它已安装的那些文件;如果您直接从包中运行它们,那么您就有运行这些文件的过时版本的风险。