12

I got this error having linter-pep8 installed.

Error: spawn pycodestyle ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
Lukasz Dynowski
  • 11,169
  • 9
  • 81
  • 124

1 Answers1

24

The error is caused by package being renamed from linter-pep8 to linter-pycodestyle v2.0.0

Solution:

  1. Uninstall pep8 sudo pip uninstall pep8
  2. Uninstall pycodestyle sudo pip uninstall pycodestyle
  3. Again installing pycodestyle sudo pip install pycodestyle
  4. Uninstall ATOM linter-pep8 package apm uninstall linter-pep8
  5. Installing ATOM linter-pycodestyle package apm install linter-pycodestyle
  6. Check if pycodestyle was installed correctly by executing which pycodestyle in terminal. It should return path to pycodestyle (eg. /usr/local/bin/pycodestyle). You might set this path in Executable Path setting of atoms' linter-pycodestyle package -but it should work by default
Lukasz Dynowski
  • 11,169
  • 9
  • 81
  • 124
  • 1
    I had to reinstall pep8 to get this to work - after running this, I ran into the error `spawn pep8 ENOENT`, which was fixed by running `sudo pip install pep8`. – camdroid Feb 15 '17 at 18:25