Is it possible to change the python version used by syntastic for syntax checking?
As the Issue https://github.com/scrooloose/syntastic/issues/385 indicates I could
If you working under virtualenv, you can use a script that detects current python version and invokes flake8 accordingly. Put the following somewhere in your path and name is flake8.sh:
#!/bin/sh
PYMAJOR=$(python --version | awk '{print $2}'| awk -F. '{print $1}')
exec "/usr/bin/python$PYMAJOR" /usr/bin/flake8 "$@"
Now in you vimrc add:
let g:syntastic_python_flake8_exe='flake8.sh'
Also make sure that both python-flake8 and python3-flake8 (on Ubuntu) are installed.