TA-Lib / ta-lib-python

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

[Win10, p3.7] import talib as tlib -> ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from object #436

Closed ALIANS-PRODUCTIONS closed 2 years ago

ALIANS-PRODUCTIONS commented 3 years ago

Unable to 'import talib as tlib' throws the following error : ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from object

Seems a lot of people have got this issue in the last six months due to version conflicts with new Numpy? However Tensorflow 2.5 seems to need numpy 1.19.5. Any suggestions how to get it working? Thank you.

System details : Fresh new windows 10 Pro build: RTX 3090 Reinstalled Anaconda, Python 3.7 pip install Tensorflow 2.5 CUDA 11.2.1 toolkit CUDNN 8.1 numpy version 1.19.5 : Tensorflow 2.5 requires this (so it warns me) (full list of dependencies attached) pip list.txt conda list.txt

mrjbq7 commented 3 years ago

In the requirements.txt list I put numpy>=1.19.4 so that should be compatible.

You could try git clone and then python3 setup.py install and see if that works better than pip? If it does, then we can figure out what's different?

ALIANS-PRODUCTIONS commented 3 years ago

Hi i found an older whl : TA_Lib-0.4.17-cp35-cp35m-win_amd64.whl on the old OS hardrive (i could no longer find this version on the unofficial download site: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib)

so TA_Lib-0.4.20-cp37-cp37m-win_amd64.whl doesnt work for the above config but the previous does, which for now is good enough :-)

mrjbq7 commented 2 years ago

Closing all installation issues, if someone has a specific problem please open a new one.