Python Eclipse、PyDev“未指定项目解释器”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30970697/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 09:15:02  来源:igfitidea点击:

Eclipse, PyDev "Project interpreter not specified”

pythoneclipsepydevinterpreter

提问by apadana

I have installed PyDev in eclipse Luna. After successful installation of PyDev, when I want to create a new project I get the error: Project interpreter not specified

我已经在 eclipse Luna 中安装了 PyDev。成功安装 PyDev 后,当我想创建一个新项目时,出现错误:未指定项目解释器

How can I fix it? There is no option for interpreter to choose from.

我该如何解决?没有可供口译员选择的选项。

eclipse version Luna, Mac OSX Yosemite, PyDev latest version (installed according to http://pydev.org/manual_101_install.html)

eclipse 版本 Luna、Mac OSX Yosemite、PyDev 最新版本(根据http://pydev.org/manual_101_install.html安装)

enter image description here

enter image description here

采纳答案by ramesh bommakanti

In my case it has worked with following steps

就我而言,它已按照以下步骤工作

Prerequisite: Python should be installed

先决条件:应安装 Python

  1. Go to Window -> Preferences -> PyDev -> Interpreters and click on "Python Interpreter".
  2. Then click on new button and add python executable location.
  1. 转到 Window -> Preferences -> PyDev -> Interpreters 并单击“Python Interpreter”。
  2. 然后单击新按钮并添加 python 可执行文件位置。

Example for windows:

c:\python2.7\python.exe

example for ubuntu:

/usr/bin/python

窗户的例子:

c:\python2.7\python.exe

以 ubuntu 为例:

/usr/bin/python
  1. Then you can attached image and click on finish.
  1. 然后您可以附加图像并单击完成。

It should work.

它应该工作。

回答by Alexandre Santos

On my Mac 10.11.3, using LiClipse 2.5.3 I solved it with these steps:

在我的 Mac 10.11.3 上,使用 LiClipse 2.5.3 我通过以下步骤解决了这个问题:

Open a terminal window and type which python

打开终端窗口并输入 which python

In my case it replied with /usr/bin/python

在我的情况下,它回复了 /usr/bin/python

Calling python it informed me I was using version 2.7.10.

调用 python 它告诉我我使用的是 2.7.10 版。

Next I called LiClipse and went LiClipse -> Preferences -> PyDev -> Interpreters -> Python Interpreter -> New

接下来我调用 LiClipse 并转到 LiClipse -> Preferences -> PyDev -> Interpreters -> Python Interpreter -> New

For "Interpreter Name" I used "Python 2.7.10", although I am aware that is just a sym link and it could be updated any time. For "Interpreter Executable" I entered "/usr/bin/python"

对于“解释器名称”,我使用了“Python 2.7.10”,但我知道这只是一个符号链接,可以随时更新。对于“解释器可执行文件”,我输入了“/usr/bin/python”

Then "Ok"

然后“好”

After that, the error message went away.

之后,错误消息消失了。

setting python interpreter location

setting python interpreter location

回答by Selvaji

In my windows system python executable installed path is C:\tools\python2\python.exe.

在我的 Windows 系统中,python 可执行文件的安装路径是 C:\tools\python2\python.exe。

as mentioned above Go to eclipse Window -> Preferences -> PyDev -> Interpreters and click on "Python Interpreter" and pointed the python executable path.

如上所述,转到 eclipse Window -> Preferences -> PyDev -> Interpreters 并单击“Python Interpreter”并指向 python 可执行路径。