setup script and documentation fixed for TA-Lib and MacOS

This commit is contained in:
misagh 2018-10-11 19:26:19 +02:00
parent 912e9bd15c
commit fb3fd7cb15
2 changed files with 10 additions and 6 deletions

View File

@ -251,7 +251,7 @@ python3 -m pip install -e .
### MacOS ### MacOS
#### Install Python 3.6, git, wget and ta-lib #### Install Python 3.6, git and wget
```bash ```bash
brew install python3 git wget brew install python3 git wget
@ -268,9 +268,9 @@ wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar xvzf ta-lib-0.4.0-src.tar.gz tar xvzf ta-lib-0.4.0-src.tar.gz
cd ta-lib cd ta-lib
sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h
./configure --prefix=/usr # On MacOS this should be --prefix=/usr/local ./configure --prefix=/usr/local
make make
make install sudo make install
cd .. cd ..
rm -rf ./ta-lib* rm -rf ./ta-lib*
``` ```

View File

@ -37,7 +37,11 @@ function updateenv () {
function install_talib () { function install_talib () {
curl -O -L http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz curl -O -L http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar zxvf ta-lib-0.4.0-src.tar.gz tar zxvf ta-lib-0.4.0-src.tar.gz
cd ta-lib && ./configure --prefix=/usr && make && sudo make install cd ta-lib
sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h
./configure --prefix=/usr/local
make
sudo make install
cd .. && rm -rf ./ta-lib* cd .. && rm -rf ./ta-lib*
} }
@ -50,8 +54,8 @@ function install_macos () {
echo "-------------------------" echo "-------------------------"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi fi
brew install python3 wget ta-lib brew install python3 wget
install_talib
test_and_fix_python_on_mac test_and_fix_python_on_mac
} }