3

I want to be alerted when I write python code that violates pep8 in the eclipse editor. As far as I can see, the settings show it should be running pep8. (Below is a screenshot of my pydev settings). I have tried:

  • verifying that it is pointing to the correct location for pep8.py
  • changing between error and warning
  • checking and unchecking 'Redirect pep8 output to console'

enter image description here

Any suggestions or input on how I can get pep8 to work for me in eclipse, I'd appreciate it.

Asclepius
  • 57,944
  • 17
  • 167
  • 143
mdoc-2011
  • 2,747
  • 4
  • 21
  • 43

3 Answers3

1

I think that you have to actively run pep8 tests when you are ready - not sure where it is hidden in the menus or if there is a keyboard short cut - try looking under 'Tools' in the menus.

The other possibility is that you may not have pep8 correctly installed where it is indicated - try copying the path from the above into a command prompt and seeing if it runs with a sample .py file and does not error. If it doesn't you should be able to install the pep8 checker from pypi under your current python installation and then point eclipse to it.

Steve Barnes
  • 27,618
  • 6
  • 63
  • 73
  • pep8 checking runs fine in my environment using the exact same setup as the OP showed with no additional commands. I use it without problems on both Python2 and Python3. Seems likely to me that there is some environmental problem in OP's environment. – Jonathan Jul 31 '13 at 16:56
0

Check that "Do code analysis" under Options is checked.

Options

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Johan
  • 35
  • 1
  • 7
0

Per an answer by Fabio, in the project's properties, add the package folder to PYTHONPATH, and also restart Eclipse if it still doesn't work.

You can also use the latest version of pep8 as an External Tool in Eclipse. For details, see an answer by Dmitry.

Asclepius
  • 57,944
  • 17
  • 167
  • 143