简体   繁体   中英

Error while installing Python TA-lib package on Linux system with no sudo privileges

I'm having trouble installing the python talib package on a linux system ( Linux 2.6.32-431.17.1.el6.x86_64 ). See https://github.com/mrjbq7/ta-lib .

What I did so far:

  • brew install ta-lib (Dependency)
    • This worked fine. If I rerun this command I see Warning: ta-lib-0.4.0 already installed
  • pip install ta-lib
    • when running this, I get the following error: error: command /home/username/.linuxbrew/bin/gcc' failed with exit status 1

I don't have sudo privileges on this machine , so I suspect this might be a problem. I also tried

pip install --user ta-lib

and

wget https://github.com/mrjbq7/ta-lib/archive/master.zip && unzip master.zip && cd ta-lib-master && python setup.py install.

Same error as above.

Any ideas as to what I'm doing wrong?

I also get stuck at this problem. Then I found two ways to solve this. This problem is because ta-lib installation only check several dirs, which not include linuxbrew path. You have two ways to solve this problem.

  1. Follow the instructions on https://github.com/mrjbq7/ta-lib , download " ta-lib-0.4.0-src.tar.gz ", and manually install ta-lib
  2. run the following code in shell, (you may need to change the path to ta-lib or ta-lib version)

    export TA_INCLUDE_PATH='/home/username/.linuxbrew/Cellar/ta-lib/0.4.0/include'

    export TA_LIBRARY_PATH='/home/username/.linuxbrew/Cellar/ta-lib/0.4.0/lib'

then run "pip install ta-lib"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM