Here is a screenshot of whats happening:
Basically, I execute everything via command line but edit the source in eclipse.
This error prevents autocomplete which is annoying.
I have gone to window>preferences>PyDev>Interpreter - Python
and set the correct values but they don't stay and even when I hit apply they don't seem to take for the current session.
Any idea on what could cause this error message?
Go to Window → Preferences. In the Preferences window, expand PyDev and select Interpreter-Python. Click "New..." and type Python32 for the Interpreter name. For the Interpreter executable, browse to your copy of Python (C:\Program Files\Python32\python.exe), and press Open.
Running Python from within Eclipse py, and Eclipse will recognize it as Python code. Type in some Python code (for instance: print 2+2 ), then right-click on the Python file you've created and select Run As >> Python run . You should see the output of your Python code in the console at the bottom of the Eclipse window.
To do this choose Window<Show View<Console as shown in the screen shot below. The next stage is to display the Python console in the Eclipse Console. When the Console window is displayed, several icons are shown on the right, include a screen icon with a +sign and a drop down menu as shown in the screen shot below.
Go to Window → Preferences. In the Preferences window, expand PyDev and select Interpreter-Python. Click "New..." and type Python32 for the Interpreter name. For the Interpreter executable, browse to your copy of Python (C:\Program Files\Python32\python.exe), and press Open.
What also works is RClick --> PyDev --> Remove PyDev Project Config.
Please note that the error marker may not be removed even after a clean/build, you may have te delete the marker manualy (just select it and delete) then clean, build and run
P.S.: I couldn't find the "project nature" option mentioned in the voted answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With