0

SO, I've set python path as in ~/.profile

export PYTHON=$PYTHON:/usr/bin/python 

I'm getting.

stack Error: Can't find Python executable ":/usr/lib/python:/usr/lib/python3.5:/usr/lib/python3.5:/usr/bin/python3.5:/usr/bin/python", you can set the PYTHON env variable.

What will be the path to the executable python ?

ShadowRanger
  • 143,180
  • 12
  • 188
  • 271
JyotiChhetri
  • 289
  • 1
  • 7
  • 21
  • Why is there a colon in front? – user2357112 Feb 15 '17 at 04:44
  • @user2357112: Sounds like someone is confusing the `PATH` variable with general usage of file paths. The OP needs to clarify what they mean by "set python path as /usr/lib/python" (for one, why would the `python` executable be installed to `/usr/lib`, not `/usr/bin`?) – ShadowRanger Feb 15 '17 at 04:46
  • You mean `export PATH=$PATH:/usr/lib/python` in `.bashrc` file? – Mohammad Yusuf Feb 15 '17 at 04:47
  • I have updated question, please have a look and suggest – JyotiChhetri Feb 15 '17 at 04:51
  • 1
    I answered speculatively, but I can't be 100% sure it's right since you didn't specify the tool you are using that treats `PYTHON` as a special environment variable. It's not a standard variable supported by the CPython reference interpreter or `bash` itself, it looks like some special tool is using it to find `python`, but that makes the question about that tool, not about Python or `bash` really. – ShadowRanger Feb 15 '17 at 05:09
  • I'd guess that it wants the `PYTHON` environment variable to be the path to the executable, not a `PATH` or `PYTHONPATH`-like list of folders. Try `PYTHON=/usr/bin/python`, maybe. Like @ShadowRanger says, this is not really a Python question, it's more about the program that's giving you that message. – Blckknght Feb 15 '17 at 05:12

1 Answers1

0

Your tool seems to want the directory that might contain the executable named python, not the full path to the executable. Try changing it to: export PYTHON=$PYTHON:/usr/bin

Looks like your tool is likely node-gyp or some other npm related thing, in which case you might want to look at this question or this one if the problem persists.

Community
  • 1
  • 1
ShadowRanger
  • 143,180
  • 12
  • 188
  • 271