Files
ray/setup-env.sh
T
Robert Nishihara b1db890cd8 Export GRPC environment variable in Python instead of in setup-env.sh (#382)
* Export GRPC logging environment variable in Python.

* Don't wipe PYTHONPATH in setup-env.sh
2016-08-18 15:39:19 -07:00

20 lines
692 B
Bash

# NO shebang! Force the user to run this using the 'source' command without spawning a new shell; otherwise, variable exports won't persist.
echo "Adding Ray to PYTHONPATH" 1>&2
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
export PYTHONPATH="$ROOT_DIR/lib/python/:$ROOT_DIR/thirdparty/numbuf/build:$PYTHONPATH"
# Print instructions for adding Ray to your bashrc.
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
BASH_RC="~/.bashrc"
elif [[ "$unamestr" == "Darwin" ]]; then
BASH_RC="~/.bash_profile"
fi
echo "To permanently add Ray to your Python path, run,
echo 'export PYTHONPATH=$ROOT_DIR/lib/python/:$ROOT_DIR/thirdparty/numbuf/build:\$PYTHONPATH' >> $BASH_RC
"