Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim-flake8 is not working

I installed vim-flake8 by git cloning it on my Pathogen bundle folder as usual, but when I tried to run the plugin pressing F7 or using :call Flake8() in one Python file I receive the following message:

Error detected while processing function Flake8:

line 8:

File flake8 not found. Please install it first.

Anyone has some clue about what is going on ?

like image 453
Jonatas Eduardo Avatar asked Jun 11 '13 14:06

Jonatas Eduardo


4 Answers

The error message is telling you that you didn't install the program flake8. Install it.

Assuming pip is installed

pip install flake8

should work.

like image 94
FDinoff Avatar answered Nov 04 '22 11:11

FDinoff


If installing flake8 via pip is not working try this:

apt-get install flake8

Worked for me.

like image 26
Kacper Wikieł Avatar answered Nov 04 '22 11:11

Kacper Wikieł


If you installed flake8 already and that error occurred still, then call flake8 using absolute path.

To do this, edit line 73 of ~/.vim/autoload/flake8.vim as following:

call s:DeclareOption('flake8_cmd', '', '"/absolute/path/to/flake8"')

like image 4
Yukino Ikegami Avatar answered Nov 04 '22 11:11

Yukino Ikegami


pip install flake8

and if you run into permission errors:

sudo -H pip install flake8
like image 4
TomKivy Avatar answered Nov 04 '22 12:11

TomKivy