Linux 如何pip install ta-lib (实测可用,避免踩坑)

做数据分析时经常要用到ta-lib这个库,但直接pip install ta-lib会报错,不妨试试以下的方法-----

sudo 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 (or sudo tar -xzf ta-lib-0.4.0-src.tar.gz)
cd ta-lib/
sudo ./configure (if gcc is missing, install it by doing “apt-get install build-essential”)
sudo make
sudo make install
pip install https://github.com/mrjbq7/ta-lib/archive/TA_Lib-0.4.8.zip
# pip install https://github.com/mrjbq7/ta-lib/zipball/master   #上式不成功用这个
 

你可能感兴趣的:(python)