Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
663 views
in Technique[技术] by (71.8m points)

python - Unable to install TA-Lib on Ubuntu

I'm trying to install Python Ta-Lib in Ubuntu,but when I run:

pip install TA-Lib

I get this error:

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YfCSFn/TA-Lib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-swmI7D-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-YfCSFn/TA-Lib/

I already installed:

sudo apt-get install python3-dev

and installed Ta-lib

How can I fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I am able to load in python3.

Steps:

  1. download from http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz

  2. untar tar -xvf ta-lib-0.4.0-src.tar.gz

  3. cd /../ta-lib

  4. ./configure --prefix=/usr

  5. make

  6. sudo make install

  7. sudo apt upgrade

  8. pip install ta-lib or pip install TA-Lib

  9. Check import talib


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...