-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject #1251
Comments
To resolve the Here is how you can update pip install --upgrade numpy If updating pip uninstall numpy
pip install numpy Additionally, ensure that all your packages are compatible with each other by updating them: pip install --upgrade pandas pandasai These steps should help resolve the binary incompatibility issue [1]. |
This is not resolving the issue |
This is because numpy has recently been upgraded to version 2.0.0, which is different from version 1.26.*. By default, pip install numpy==2.0.0 is used. The solution is simply to run |
Came here to mention I also had to downgrade numpy. Hopefully 2.0 compatibility is coming. If it's not getting fixed, it's probably worth mentioning in the docs that it's not (yet?) compatible with numpy 2.0+ and you should specify the latest 1.x release. |
Downgrading the numpy version was helpful. Thanks @wjjc1017!. |
System Info
OS Version: 14.4.1
Python Version: 3.9.7
PandasAI version: 0.2.2
🐛 Describe the bug
Used the following code:
import os
import pandas as pd
from pandasai.agent import Agent
Sample DataFrame
sales_by_country = pd.DataFrame({
"country": ["United States", "United Kingdom", "France", "Germany", "Italy", "Spain", "Canada", "Australia", "Japan", "China"],
"sales": [5000, 3200, 2900, 4100, 2300, 2100, 2500, 2600, 4500, 7000]
})
By default, unless you choose a different LLM, it will use BambooLLM.
##You can get your free API key signing up at https://pandabi.ai (you can also configure it in your .env file)
os.environ["PANDASAI_API_KEY"] = ""
agent = Agent(sales_by_country)
response = agent.chat('write insight about data')
print(response)
The text was updated successfully, but these errors were encountered: