Reputation: 17784
I have just installed PyDev into eclipse and tried writing a hello world application. But eclipse underline even the print
function and gives message of print:undefined variable
on hover. But the code works fine. When I run the application it runs fine and prints Hello World
on console. I am attaching the screenshot for reference
Please note that I have come across similar question and proposed solution of removing and re-adding the interpreter did not work for me. I am on Ubuntu 16.0.4 machine if that matters.
Edit
I have following entries in python interpreter's tab
Upvotes: 0
Views: 1084
Reputation: 73
I had the similar problem, so following suggestions of:
PyDev Docs
I added missing LD_LIBRARY_PATH in Window->Preferences->Python Interpreter (Environment tab), and then closed and reopened the project (no need to recreate the project). Once I reopen the files that had errors, the errors were gone.
Upvotes: 0
Reputation: 17784
The problem solved by removing all the interpreters, including them again and recreating the project. Please note that project created before removing/adding interpreters still showed error. So I removed them as well and created a new project which worked fine.
Upvotes: 1