You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To resolve the ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject error, you can try updating or reinstalling the numpy package. This error often occurs due to a mismatch between the versions of numpy and other packages that depend on it.
Here is how you can update numpy using pip:
pip install --upgrade numpy
If updating numpy does not resolve the issue, you can try reinstalling it:
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 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 pip install numpy==1.26.4 pyyaml
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.
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: