Merge pull request #1470 from freqtrade/fix/installscript

fix and improve installation script
This commit is contained in:
Misagh 2019-01-06 11:55:43 +01:00 committed by GitHub
commit 86023744d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,11 @@ function check_installed_python() {
return return
fi fi
if [ -z ${PYTHON} ]; then
echo "No usable python found. Please make sure to have python3.6 or python3.7 installed"
exit 1
fi
} }
function updateenv() { function updateenv() {
@ -25,15 +30,14 @@ function updateenv () {
echo "-------------------------" echo "-------------------------"
source .env/bin/activate source .env/bin/activate
echo "pip3 install in-progress. Please wait..." echo "pip3 install in-progress. Please wait..."
pip3 install --quiet --upgrade pip # Install numpy first to have py_find_1st install clean
pip3 install --quiet -r requirements.txt --upgrade pip3 install --upgrade pip numpy
pip3 install --quiet -r requirements.txt pip3 install --upgrade -r requirements.txt
read -p "Do you want to install dependencies for dev [Y/N]? " read -p "Do you want to install dependencies for dev [Y/N]? "
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
then then
pip3 install --quiet -r requirements-dev.txt --upgrade pip3 install --upgrade -r requirements-dev.txt
pip3 install --quiet -r requirements-dev.txt
else else
echo "Dev dependencies ignored." echo "Dev dependencies ignored."
fi fi
@ -45,6 +49,11 @@ function updateenv () {
# Install tab lib # Install tab lib
function install_talib() { function install_talib() {
if [ -f /usr/local/lib/libta_lib.a ]; then
echo "ta-lib already installed, skipping"
return
fi
cd build_helpers cd build_helpers
tar zxvf ta-lib-0.4.0-src.tar.gz tar zxvf ta-lib-0.4.0-src.tar.gz
cd ta-lib cd ta-lib