Skip to content

addressing pandas import error, specified numpy version#49

Open
zencodess wants to merge 2 commits intowhchien:mainfrom
zencodess:main
Open

addressing pandas import error, specified numpy version#49
zencodess wants to merge 2 commits intowhchien:mainfrom
zencodess:main

Conversation

@zencodess
Copy link
Copy Markdown

Resolved #48

The latest version of numpy seems to be causing problems like,

Traceback (most recent call last):
File "/home/sathyasravya/repos/funda-scraper/tests/test_preprocess.py", line 1, in
import pandas as pd
File "/home/sathyasravya/repos/funda-scraper/funda_venv/lib/python3.10/site-packages/pandas/init.py", line 22, in
from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401
File "/home/sathyasravya/repos/funda-scraper/funda_venv/lib/python3.10/site-packages/pandas/compat/init.py", line 25, in
from pandas.compat.numpy import (
File "/home/sathyasravya/repos/funda-scraper/funda_venv/lib/python3.10/site-packages/pandas/compat/numpy/init.py", line 4, in
from pandas.util.version import Version
File "/home/sathyasravya/repos/funda-scraper/funda_venv/lib/python3.10/site-packages/pandas/util/init.py", line 2, in
from pandas.util._decorators import ( # noqa:F401
File "/home/sathyasravya/repos/funda-scraper/funda_venv/lib/python3.10/site-packages/pandas/util/_decorators.py", line 14, in
from pandas._libs.properties import cache_readonly
File "/home/sathyasravya/repos/funda-scraper/funda_venv/lib/python3.10/site-packages/pandas/_libs/init.py", line 13, in
from pandas._libs.interval import Interval
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

I have looked into it and found that downgrading the version is the solution

@muchiNoChi
Copy link
Copy Markdown

muchiNoChi commented Sep 29, 2024

The latest version of pandas worked for me (2.2.3 as of today), I just had to re-install it

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

Successfully merging this pull request may close these issues.

pandas import error

2 participants