Update path.sh to avoid warning when there is no gurobi.
This commit is contained in:
parent
8caa124986
commit
79210f8ee6
19
path.sh
19
path.sh
@ -4,19 +4,20 @@ PYTHONPATH=${PYTHONPATH}:${HOME}/Dev/python/libs
|
|||||||
PYTHONPATH=${PYTHONPATH}:/local/lib/python3.4
|
PYTHONPATH=${PYTHONPATH}:/local/lib/python3.4
|
||||||
PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.4
|
PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.4
|
||||||
|
|
||||||
GUROBI_PATH=$(ls -d $HOME/.softwares/gurobi*/linux64 2> /dev/null)
|
|
||||||
|
|
||||||
if [ -e "$GUROBI_PATH" ]; then
|
|
||||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GUROBI_PATH}/lib
|
|
||||||
PATH=${PATH}:${GUROBI_PATH}/bin
|
|
||||||
PYTHONPATH=${PYTHONPATH}:${GUROBI_PATH}/lib/python3.4_utf32
|
|
||||||
export GRB_LICENSE_FILE=${GUROBI_PATH}/gurobi.lic
|
|
||||||
fi
|
|
||||||
|
|
||||||
MYSOFT_PATH=$HOME/.softwares
|
MYSOFT_PATH=$HOME/.softwares
|
||||||
|
|
||||||
if [ -e "$MYSOFT_PATH" ]; then
|
if [ -e "$MYSOFT_PATH" ]; then
|
||||||
PATH=${PATH}:${MYSOFT_PATH}/bin
|
PATH=${PATH}:${MYSOFT_PATH}/bin
|
||||||
|
|
||||||
|
HAS_GUROBI=$(ls ${MYSOFT_PATH} | grep "gurobi")
|
||||||
|
if [ ! -z "${HAS_GUROBI}" ]; then
|
||||||
|
GUROBI_PATH=$(ls -d $HOME/.softwares/gurobi*/linux64)
|
||||||
|
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GUROBI_PATH}/lib
|
||||||
|
PATH=${PATH}:${GUROBI_PATH}/bin
|
||||||
|
PYTHONPATH=${PYTHONPATH}:${GUROBI_PATH}/lib/python3.4_utf32
|
||||||
|
export GRB_LICENSE_FILE=${GUROBI_PATH}/gurobi.lic
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH
|
export PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user