0

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 enter image description here 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 enter image description here

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 Answers2

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.

Elletlar
  • 3,136
  • 7
  • 32
  • 38
tulu
  • 73
  • 1
  • 8