Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subprocess.CalledProcessError raised in .../pebble_tool/commands/sdk/__init__.py #25

Open
gjorando opened this issue May 4, 2016 · 3 comments

Comments

@gjorando
Copy link

gjorando commented May 4, 2016

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).

@arjan
Copy link

arjan commented Sep 9, 2016

#44 is a duplicate of this. Apparently some build tools call out to the bare 'python' in the path directly; fixing the check might break something else in the build chain.

@gjorando
Copy link
Author

gjorando commented Sep 9, 2016

Ok ! Did you create a PR with a fix ?

@gjorando gjorando closed this as completed Sep 9, 2016
@gjorando gjorando reopened this Sep 9, 2016
@arjan
Copy link

arjan commented Sep 10, 2016

No; because I don't know if my proposed fix is correct. I suppose I could still do a PR..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants