I was reading the documentation for flake8 and saw that it can be invoked specifying the python version. I would like to be able to do both 2.7 and 3+. When I attempt 3, it works just fine, but when I do 2.7 I get an error. The documentation is as follows:
Where you simply allow the shell running in your terminal to locate Flake8. In some cases, though, you may have installed Flake8 for multiple versions of Python (e.g., Python 2.7 and Python 3.5) and you need to call a specific version. In that case, you will have much better results using:
python2.7 -m flake8
When running it, I get the following error:
No module named flake8.__main__; 'flake8' is a package and cannot be directly executed
However, invoking it with just the command flake8
works just fine.