Unable to install TA-Lib on Ubuntu

前端 未结 2 582
萌比男神i
萌比男神i 2020-12-15 12:54

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/pyth         


        
相关标签:
2条回答
  • 2020-12-15 13:32

    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

    0 讨论(0)
  • 2020-12-15 13:42

    Seem like other people had this problem.

    To quote the accepted answer:

    Seems that your PiP can't access Setuptools as per the "import setuptools" in the error. Try the below first then try running your pip install again.

    > sudo pip install -U setuptools
    

    Or if it doesn't work to quote his comment:

    Try this 'sudo -H pip install TA-Lib'

    As Filipe Ferminiano said in comment if this still doesn't fix it then you can try what is said on this link .

    To quote the accepted answer once again:

    Your sudo is not getting the right python. This is a known behaviour of sudo in Ubuntu. See this question for more info. You need to make sure that sudo calls the right python, either by using the full path:
    sudo /usr/local/epd/bin/python setup.py install
    

    or by doing the following (in bash):

    alias sudo='sudo env PATH=$PATH'
    sudo python setup.py install
    

    Here is the question he's talking about

    Please give credit to the one of the accepted answer if it fix your problem.

    0 讨论(0)
提交回复
热议问题