Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy incompatible with Talib #661

Open
JerryYin7 opened this issue Jul 4, 2024 · 6 comments
Open

Numpy incompatible with Talib #661

JerryYin7 opened this issue Jul 4, 2024 · 6 comments

Comments

@JerryYin7
Copy link

Hi,
After I downloaded talib, there is no way for me to run my code. There will be the error message that:
File "/Users/guangzhouzuihoudehaonanren/Desktop/intern/intern.py", line 2, in
import backtrader as bt
File "/Users/guangzhouzuihoudehaonanren/Desktop/intern/quant/lib/python3.12/site-packages/backtrader/init.py", line 86, in
from . import talib as talib
File "/Users/guangzhouzuihoudehaonanren/Desktop/intern/quant/lib/python3.12/site-packages/backtrader/talib.py", line 34, in
import talib
File "/Users/guangzhouzuihoudehaonanren/Desktop/intern/quant/lib/python3.12/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.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Thanks!!!

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 4, 2024 via email

@JerryYin7
Copy link
Author

What version of numpy are you using?

2.0.0

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 4, 2024 via email

@michaelpeck
Copy link

What version should we use? Just downgraded to 1.26.4 and still having issues. Thanks!

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 20, 2024

It should work with any numpy < 2.

What issues are you having?

@pinnnkman
Copy link

What version should we use? Just downgraded to 1.26.4 and still having issues. Thanks!

"numpy==1.19.5" will sovle this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants