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
Asked
Active
Viewed 1,032 times
0

Community
- 1
- 1

Muhammad Adeel Zahid
- 17,474
- 14
- 90
- 155
-
Can you check if you have some error in your error log? See: http://www.pydev.org/faq.html#PyDevFAQ-HowdoIReportaBUG%3F -- This seems an issue finding the 'print' name in the builtins -- see if it's related to: http://www.pydev.org/faq.html#PyDevFAQ-WhenIdoacodecompletion%2CPyDevhangs%2CwhatcanIdo%3F – Fabio Zadrozny Jan 31 '17 at 16:02
2 Answers
1
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.

Muhammad Adeel Zahid
- 17,474
- 14
- 90
- 155
0
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.