I got the same error when using yapf and resolved it by explicitly setting the interpreter path (i.e., the path to the Python executable) through the Settings panel or by modifying settings.json:
"yapf.interpreter": [
"/usr/bin/python" // Your python path
]