I am trying to execute below lines of code:
import seaborn as sns
sns.set(color_codes=True)
sns.displot(tcs[“Close Price”])
plt.show()
Getting following error:
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
following are the installed versions:
- seaborn: 0.12.2
- numpy: 1.26.4
- pandas: 2.2.2
- matplotlib: 3.9.1
Please help to resolve the issue.
If I install different seaborn versions, I get following error:
ImportError: cannot import name ‘VectorPlotter’ from ‘seaborn._core’ (/Users/jayant/Desktop/EPat-Quantisti/Anaconda-Python/Installation/anaconda3/envs/quantra_py/lib/python3.11/site-packages/seaborn/_core/init.py)
Hi,
The quantra_py virtual environment sets Numpy at 1.24.4, but you report numpy: 1.26.4 installed. Something must have upgraded NumPy after the environment was built (often pip installing a package that pulled a newer NumPy). That upgrade is almost certainly what broke the binary compatibility, because packages like ta-lib, numba, scipy, and others were compiled against 1.24.4.
Can you try force reinstalling numpy to the earlier version.
You can do it by going to anaconda prompt and after activating the quantra_py environment, run the following command
pip install “numpy==1.24.4”
If this does not work, try the following,
pip install --force-reinstall --no-cache-dir numpy==1.24.4 pandas==2.2.2 scipy==1.10.1
Let me know if this still causes an error in seaborn.