eclipse 为什么 Pydev 会为内置关键字提供语法错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8099380/
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
Why is Pydev giving a syntax error for built-in keywords?
提问by Raffi Khatchadourian
Why is Pydev giving me syntax errors for built-in python functions like str()?
为什么 Pydev 会为我提供 str() 等内置 Python 函数的语法错误?
Undefined variable: str
Undefined variable: False
Undefined variable: float
未定义变量:str
未定义的变量:假
未定义变量:float
回答by Raffi Khatchadourian
Remove and re-add the python interpreter in the PyDev configuration. Make sure that the project is using the newly added interpreter.
在 PyDev 配置中删除并重新添加 python 解释器。确保项目正在使用新添加的解释器。
回答by Fabio Zadrozny
This means that there's a problem with starting the shell to get completions for builtins (usually a firewall or a misconfiguration in the network -- see: http://pydev.org/faq.html#PyDevFAQ-WhenIdoacodecompletion%2CPyDevhangs%2CwhatcanIdo%3Fwhich may give you hints on how to solve it).
这意味着启动 shell 以获得内置程序的完成有问题(通常是防火墙或网络中的错误配置 - 请参阅:http: //pydev.org/faq.html#PyDevFAQ-WhenIdoacodecompletion%2CPyDevhangs%2CwhatcanIdo%3F这可能会给您有关如何解决它的提示)。
Also, please add details on your error log if you're unable to solve it (see: http://pydev.org/faq.html#how_do_i_report_a_bugfor details on getting the error log).
另外,如果您无法解决它,请在您的错误日志中添加详细信息(有关获取错误日志的详细信息,请参阅:http: //pydev.org/faq.html#how_do_i_report_a_bug)。
回答by Christoph G?ttert
For those ppl who are using Aptanaand have the same Problem:
对于那些使用Aptana并遇到相同问题的人:
I upgraded Aptana and PyDev with the following instructions:
我按照以下说明升级了 Aptana 和 PyDev:
after the upgrade PyDev worked just fine for me :)
升级后 PyDev 对我来说工作得很好:)