import pandas as pd
ValueError Traceback (most recent call last) Cell In[2], line 1 ----> 1 import pandas as pd
File ~/pipeline-python-mongo-mysql/venv/lib/python3.10/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 ~/pipeline-python-mongo-mysql/venv/lib/python3.10/site-packages/pandas/compat/init.py:25 17 from pandas.compat._constants import ( 18 IS64, 19 PY39, (...) 22 PYPY, 23 ) 24 import pandas.compat.compressors ---> 25 from pandas.compat.numpy import ( 26 is_numpy_dev, 27 np_version_under1p21, 28 ) 29 from pandas.compat.pyarrow import ( ... 22 )
File ~/pipeline-python-mongo-mysql/venv/lib/python3.10/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
Alternativa para solução:
Se mesmo após executar o comando !pip install pandas o erro persistir, clique em "Clear All Outputs" e depois em "Restart" no VSCode. Após, execute o script novamente desde o inicio. aqui funcionou ok!