How to integrate python3-flake8 with Atom in Ubuntu 16.04

为君一笑 提交于 2019-12-11 04:33:42

问题


I installed python3-flake8 on Ubuntu 16.04 with the command sudo apt-get install python3-flake8 Then proceeded to install the flake8 linter package on Atom. However on restart it shows the following error Error: spawn flake8 ENOENT.

I do not know if atom is able to detect flake8 on my system or if it is some other kind of problem.

Error message:

Error: spawn flake8 ENOENT
    at exports._errnoException (util.js:890:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

回答1:


From Ubuntu 16.04, the flake8 binary can be found in the flake8 package rather than python3-flake8 (Xenial/16.04 and Yakkety/16.10). Installing this will allow you to use the flake8 command in the terminal, and will also allow Atom to access it and lint your code.

You can install flake8 correctly with:

sudo apt-get install flake8


来源:https://stackoverflow.com/questions/39548524/how-to-integrate-python3-flake8-with-atom-in-ubuntu-16-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!