Ask for plotting dependency installation

This commit is contained in:
Matthias 2020-11-30 21:17:50 +01:00
parent 5f70d1f9a7
commit cec771b593

View File

@ -67,20 +67,25 @@ function updateenv() {
REQUIREMENTS=requirements.txt REQUIREMENTS=requirements.txt
fi fi
REQUIREMENTS_HYPEROPT="" REQUIREMENTS_HYPEROPT=""
if [ "${SYS_ARCH}" != "armv7l" ]; then REQUIREMENTS_PLOT=""
read -p "Do you want to install plotting dependencies (plotly) [y/N]? "
if [[ $REPLY =~ ^[Yy]$ ]]
then
REQUIREMENTS_PLOT="-r requirements-plot.txt"
fi
if [ "${SYS_ARCH}" == "armv7l" ]; then
echo "Detected Raspberry, installing cython, skipping hyperopt installation."
${PYTHON} -m pip install --upgrade cython
else
# Is not Raspberry # Is not Raspberry
read -p "Do you want to install hyperopt dependencies for dev [y/N]? " read -p "Do you want to install hyperopt dependencies [y/N]? "
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
then then
REQUIREMENTS_HYPEROPT="-r requirements-hyperopt.txt" REQUIREMENTS_HYPEROPT="-r requirements-hyperopt.txt"
fi fi
fi fi
if [ "${SYS_ARCH}" == "armv7l" ]; then ${PYTHON} -m pip install --upgrade -r ${REQUIREMENTS} ${REQUIREMENTS_HYPEROPT} ${REQUIREMENTS_PLOT}
echo "Detected Raspberry, installing cython."
${PYTHON} -m pip install --upgrade cython
fi
${PYTHON} -m pip install --upgrade -r ${REQUIREMENTS} ${REQUIREMENTS_HYPEROPT}
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Failed installing dependencies" echo "Failed installing dependencies"
exit 1 exit 1