Eclipse:“未配置Python”

问题描述 投票:10回答:6

以下是发生的事情的屏幕截图:

基本上,我通过命令行执行所有操作,但在eclipse中编辑源代码。 此错误会阻止自动完成,这很烦人。

我已经去了window>preferences>PyDev>Interpreter - Python并设置了正确的值,但他们没有停留,即使我点击申请他们似乎没有参加当前的会议。

有什么可能导致此错误消息的任何想法?

python eclipse pydev
6个回答
3
投票

Project Properties> Project Natures并取消选中python的东西。


3
投票

什么也有效RClick - > PyDev - >删除PyDev项目配置。

steps_screen_shoot

请注意,即使在清理/构建之后,也可能无法删除错误标记,您可以手动删除标记(只需选择并删除)然后清理,构建和运行

P.S。:我找不到投票答案中提到的“项目性质”选项。


2
投票
       1. Select your project and right click and click on Properties
       2. Select PyDev-Interpreter/Grammer,click on "Click here to configure an    
          Interpreter not listed" Link.

2
投票

转到窗口→首选项。在Preferences窗口中,展开PyDev并选择Interpreter-Python。单击“新建...”并键入Python32作为解释器名称。对于Interpreter可执行文件,浏览到您的Python副本(C:\ Program Files \ Python32 \ python.exe),然后按“打开”。


0
投票

当多个用户使用时,在DropBox设置中很容易发生permssion问题(在“.pydevproject”中提及How to persist PYTHONPATH setting of an Eclipse Pydev project?)。

例如,请参阅“How to fix Drop Box permissions issues in 10.5”(如果您使用的是Mac,但一般的想法也适用于其他类似Unix的操作系统)

此问题的永久性解决方法是将适当的ACL添加到Drop Box文件夹。 要做到这一点,请打开终端,然后输入此命令 - 注意您不能按原样复制和粘贴它,因为您需要将两次short_username替换为用户的实际短用户名。 出于这个原因,我建议将其复制到TextEdit中,根据需要进行编辑,然后将其粘贴到Terminal中。

chmod +a "short_username allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" /Users/short_username/Public/Drop\ Box

运行此命令后,您应该发现Drop Box按预期工作,并且您拥有其他人留给您使用的文件的完全权限


0
投票

在Mac上,

open eclipse application,   
click preferences    
click PyDev    
Click Interpreter  
Click Python Interpreter  (below Figure 1)
Click Choose from List button (below Figure 2)
Select what ever Python version you want to use  
Click Apply  
Click OK   
Exit Eclipse
ReOpen it and all fixed.

enter image description here enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.