python installation path
I've tried making a package for my python project, and this has an sh script that does some post install python setup.py install for some dependencies/subprojects. But turns out that MacOS installer creates it's own context and screws up some paths so going simply:
python setup.py install - won't work
One solution that seems to help is to do:
usr/local/bin/python setup.py install
Now I'm kind of a newbie to MacOS so here are my questions:
- Is this the default/standard location of python? What I mean is that I plan to distribute this package so can I expect that a machine that has python installed开发者_开发问答 will have a usr/local/bin/python ?
- In case that the answer to 1. is no, how could I get the location to their python installation? $PATH contains a lot more and $PYTHONPATH is not what I'm looking for either.
Regards, Bogdan
You most certainly can not assume that python is installed there. If python is properly installed, it should be in the $PATH
, otherewise you just can't know. I could have installed it at /whatever/snake-program/
, if it wasn't in the path, how could you guess?
EDIT: What do you mean $PATH
contains a lot more by the way? As long as there aren't more than one python install, that shouldn't matter.
精彩评论