pebble new-project foo --simple
yields
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007f601126d700 (most recent call first):
'python' doesn't mean anything on this system.
Despite of a successful installation of the SDK on Linux (via https://developer.pebble.com/sdk/install/linux/ ).
Forcing my shell environment to use python2 (ln -s /usr/bin/python2 ~/foobin/python && ln -s /usr/bin/python2-config ~/foobin/python-config && export PATH=~/foobin:$PATH for instance) appears to fix the problem, as well as changing
version = int(subprocess.check_output(["python", "-c", "import sys; print(sys.version_info[0])"]).strip())
to
version = int(subprocess.check_output(["python2", "-c", "import sys; print(sys.version_info[0])"]).strip())
in https://github.com/pebble/pebble-tool/blob/master/pebble_tool/commands/sdk/__init__.py (line 36).