Custom HummingBot for Whitebit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hummingbot/install

50 lines
1.5 KiB

12 months ago
#!/bin/bash
cd $(dirname $0)
# Compatibility logic for older Anaconda versions.
if [ "${CONDA_EXE} " == " " ]; then
CONDA_EXE=$((find /opt/conda/bin/conda || find ~/anaconda3/bin/conda || \
find /usr/local/anaconda3/bin/conda || find ~/miniconda3/bin/conda || \
find /root/miniconda/bin/conda || find ~/Anaconda3/Scripts/conda || \
find $CONDA/bin/conda) 2>/dev/null)
fi
if [ "${CONDA_EXE}_" == "_" ]; then
echo "Please install Anaconda w/ Python 3.7+ first"
echo "See: https://www.anaconda.com/distribution/"
exit 1
fi
CONDA_BIN=$(dirname ${CONDA_EXE})
ENV_FILE=setup/environment.yml
if ${CONDA_EXE} env list | egrep -qe "^hummingbot"; then
${CONDA_EXE} env update -f $ENV_FILE
else
${CONDA_EXE} env create -f $ENV_FILE
fi
source "${CONDA_BIN}/activate" hummingbot
# Add the project directory to module search paths.
conda develop .
# For some reason, this needs to be installed outside of the environment file,
# or it'll give you the graphviz install error.
pip install objgraph
pre-commit install
# The following logic is required to replace the grpcio package installed from conda binaries in Mac Intel
# for binaries from Pypi. We need to do this because the conda binaries fro Mac Intel are broken.
# We can't use the Pypi binaries universally because they are broken for Mac ARM (M1 and M2).
# This logic can be removed once the grpcio conda binaries for Mac Intel are fixed
OS=`uname`
ARCH=`uname -m`
if [[ "$OS" = "Darwin" && "$ARCH" = "x86_64" ]]; then
pip install grpcio --ignore-installed
fi