TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.56k stars 1.75k forks source link

ValueError: numpy.ndarray size changed #570

Closed drulye closed 1 year ago

drulye commented 1 year ago
  1. install:

cd ~/Downloads 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 cd ta-lib/ ./configure --prefix=/usr make sudo make install pip install TA-Lib

  1. run:

(base) drulye@drulye-MS-7885:~$ python Python 3.9.13 (main, Aug 25 2022, 23:26:10) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. import numpy print (numpy.version.version) 1.21.5 import talib Traceback (most recent call last): File "", line 1, in File "/home/drulye/anaconda3/lib/python3.9/site-packages/talib/init.py", line 93, in from ._ta_lib import ( File "talib/_ta_lib.pyx", line 1, in init talib._ta_lib ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

mrjbq7 commented 1 year ago

The easiest fix is to use a newer numpy.

On Sun, Dec 11, 2022 at 3:45 PM drulye @.***> wrote:

My installation process:

cd ~/Downloads 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 cd ta-lib/ ./configure --prefix=/usr make sudo make install

pip install TA-Lib

— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/570#issuecomment-1345692888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A4U6TQWHVD7VSYMOMTWMZRTJANCNFSM6AAAAAAS3JJQP4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

drulye commented 1 year ago

Thank you! The commands below helped me solve the error:

pip uninstall numpy pip install numpy