Created
January 20, 2025 21:43
-
-
Save vitorcalvi/a4a6de9728a81d78327bbab748d90a0c to your computer and use it in GitHub Desktop.
install ta-lib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set TA-Lib version | |
PYTHON_TA_LIB_VERSION="0.4.28" | |
# Update package list and install dependencies | |
echo "Updating package list and installing dependencies..." | |
sudo apt-get update | |
sudo apt-get install -y build-essential wget libcurl4-openssl-dev python3-dev python3-pip | |
# Download and extract TA-Lib | |
echo "Downloading and extracting TA-Lib..." | |
cd /tmp | |
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz | |
tar -xzf ta-lib-0.4.0-src.tar.gz | |
# Build and install TA-Lib | |
echo "Building and installing TA-Lib..." | |
cd ta-lib | |
./configure --prefix=/usr | |
make | |
sudo make install | |
# Install Python dependencies | |
echo "Installing Python dependencies..." | |
sudo pip3 install setuptools numpy | |
sudo pip3 install ta-lib==${PYTHON_TA_LIB_VERSION} | |
# Clean up (optional) | |
echo "Cleaning up..." | |
cd /tmp | |
sudo rm -rf ta-lib ta-lib-0.4.0-src.tar.gz | |
echo "TA-Lib installation complete!" | |
# If you need to add the TA-Lib library path to ldconfig (recommended): | |
echo "Adding TA-Lib library path to ldconfig..." | |
echo "/usr/lib" | sudo tee /etc/ld.so.conf.d/ta-lib.conf | |
sudo ldconfig | |
echo "ldconfig update complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment