简体   繁体   中英

Atom linter-flake8 failed to spawn (not in PATH)

i installed linter-flake8 package in Atom . I got this error :

[Linter] Error running Flake8 Error: Failed to spawn command flake8 . Make sure flake8 is installed and on your PATH

i'm sure flake8 is in the PATH . Have a look at the image i attach. I try to input the executable path to the flake8 setting but still doesn't work. I use windows 10 and i have python 2.7 and 3.5 installed . The 2.7 is installed in C:/python27, while 35 is installed in user/local folder (see attachment).

Found similar case in this forum , but still can't make it work. Does anyone know the solution ?

error message: 错误信息

confirm flake8 installed in both python version : 在此处输入图片说明

在此处输入图片说明

Tried to add path , but none of them works : 在此处输入图片说明

在此处输入图片说明

my env path has included the python lib (at the bottom) : 在此处输入图片说明

You need to find where is executable of flake8 on your system. As you have Windows you need in CMD execute such command:

where flake8

and then resulting path add to PATH variable. In my case that was

C:\\ProgramData\\Anaconda3\\Scripts

It means flake8 dir cannot be found by Atom.

The easiest way is to figure out where flake8 is located:

% which flake8
/Users/{username}/.pyenv/shims/flake8

Then go to Atom -> Preferences (MacOS) -> flake8 -> settings

在 flake8 Executable Path 上,添加路径 Post the path in the Executable Path box

And you're good to go!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM