graalpython icon indicating copy to clipboard operation
graalpython copied to clipboard

import talib error

Open cxh793602333 opened this issue 9 months ago • 1 comments

Describe the bug Unable to import talib - not sure what changed, but now i'm getting these errors:

Image

To Reproduce Steps to reproduce the behavior:

  1. Install dependencies for TA-Lib. RUN wget https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz
    && tar -xzf ta-lib-0.6.4-src.tar.gz
    && cd ta-lib-0.6.4
    && ./configure --prefix=/usr
    && make
    && sudo make install

  2. Install TA-Lib. pip install ta-lib

  3. Import talib in Python. import talib

All installed components

Image

Desktop

  • OS:22.04.1-Ubuntu

graalpython version

  • graalpy-24.2.0-linux-amd64

cxh793602333 avatar Mar 19 '25 08:03 cxh793602333

It seems ta-lib doesn't recythonize their sources during build, which is needed to apply graalpy-specific compatibility changes in cython. You should be able to make it recythonize if you install cython by hand. Try:

pip install numpy cython==3.0.11
pip install --no-cache --no-build-isolation ta-lib

msimacek avatar Mar 21 '25 10:03 msimacek