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 ?

6
  • Why is there a colon in front? Commented Feb 15, 2017 at 4: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?) Commented Feb 15, 2017 at 4:46
  • You mean export PATH=$PATH:/usr/lib/python in .bashrc file? Commented Feb 15, 2017 at 4:47
  • I have updated question, please have a look and suggest Commented Feb 15, 2017 at 4: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. Commented Feb 15, 2017 at 5:09

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.