Configure python path?


#1

How can one configure the python path. I’m getting this error: I can put a symlink to my version of python, but shouldn’t this use the python executable from the $PATH.

npm http GET https://registry.npmjs.org/cordova-ios/3.6.3
npm http 200 https://registry.npmjs.org/cordova-ios/3.6.3
npm http GET https://registry.npmjs.org/cordova-ios/-/cordova-ios-3.6.3.tgz
npm http 200 https://registry.npmjs.org/cordova-ios/-/cordova-ios-3.6.3.tgz
Creating ios project...
/Users/w1zeman1p/.cordova/lib/npm_cache/cordova-ios/3.6.3/package/bin/create: /Users/w1zeman1p/.cordova/lib/npm_cache/cordova-ios/3.6.3/package/bin/update_cordova_subproject: /usr/bin/python: bad interpreter: No such file or directory
Error: /Users/w1zeman1p/.cordova/lib/npm_cache/cordova-ios/3.6.3/package/bin/create: Command failed with exit code 126
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)

#2

Incase others run into this problem and want to know the little hack:
This is based on my python version living in /usr/local/bin/ rather than /usr/bin

$ which python
/usr/local/bin/python
$ sudo ln -s /usr/local/bin/python /usr/bin/python
$ ionic platform remove ios
$ ionic platform add ios