12

安装 linter-pep8 后出现此错误。

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)
4

1 回答 1

24

该错误是由于包从linter-pep8重命名为linter -pycodestyle v2.0.0

解决方案

  1. 卸载pep8 sudo pip uninstall pep8
  2. 卸载pycodestyle sudo pip uninstall pycodestyle
  3. 再次安装pycodestyle sudo pip install pycodestyle
  4. 卸载 ATOM linter-pep8apm uninstall linter-pep8
  5. 安装 ATOM linter-pycodestyleapm install linter-pycodestyle
  6. 通过在终端中执行检查是否正确安装了pycodestylewhich pycodestyle。它应该返回pycodestyle的路径 (例如。/usr/local/bin/pycodestyle)。您可以在atom 的linter-pycodestyle包的Executable Path设置中设置此路径- 但它应该默认工作
于 2017-02-07T11:44:50.377 回答