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

Value Error when importing pandasai #1273

Closed
Timmy485 opened this issue Jul 10, 2024 · 1 comment
Closed

Value Error when importing pandasai #1273

Timmy485 opened this issue Jul 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Timmy485
Copy link

System Info

pandasai version: 2.2.10
python version: 3.11.3

🐛 Describe the bug

import os
import pandas as pd
from pandasai import Agent
from dotenv import load_dotenv
from pandasai import SmartDataframe
from pandasai.llm import OpenAI

Running just this gives this error

ValueError                                Traceback (most recent call last)
Cell In[3], line 2
      1 import os
----> 2 import pandas as pd
      3 from pandasai import Agent
      4 from dotenv import load_dotenv

File c:\Users\TurnerZ\Documents\GitHub\RAIA\.venv\Lib\site-packages\pandas\__init__.py:22
     19 del _hard_dependencies, _dependency, _missing_dependencies
     21 # numpy compat
---> 22 from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
     24 try:
     25     from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib

File c:\Users\TurnerZ\Documents\GitHub\RAIA\.venv\Lib\site-packages\pandas\compat\__init__.py:18
     15 from typing import TYPE_CHECKING
     17 from pandas._typing import F
---> 18 from pandas.compat.numpy import (
     19     is_numpy_dev,
     20     np_version_under1p21,
     21 )
     22 from pandas.compat.pyarrow import (
     23     pa_version_under1p01,
     24     pa_version_under2p0,
...
     22 )

File c:\Users\TurnerZ\Documents\GitHub\RAIA\.venv\Lib\site-packages\pandas\_libs\interval.pyx:1, in init pandas._libs.interval()

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
@dosubot dosubot bot added the bug Something isn't working label Jul 10, 2024
Copy link

dosubot bot commented Jul 10, 2024

Hello, @Timmy485! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!

To resolve the ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject error, you should downgrade numpy to version 1.26.4. You can do this by running the following command:

pip install numpy==1.26.4 pyyaml

This should resolve the binary incompatibility issue you're encountering [1].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot mentioned this issue Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant