BUILD: ValueError
raised when importing pandas due to numpy.ndarray
size change
#54178
Closed
1 task done
Labels
Installation check
Platform
Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31
Installation Method
pip install
pandas Version
2.1.0.dev0+1210.gaa4922a96b
Python Version
3.10.12
Installation Logs
I followed the instructions provided at https://pandas.pydata.org/docs/dev/development/contributing_environment.html and successfully installed pandas using
mamba
with the commandpython -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
.However, when attempting to import pandas using either
pytest pandas
orimport pandas
, I encountered the following error:ValueError: numpy.ndarray size changed, which may indicate binary incompatibility. Expected 96 from C header, but got 88 from PyObject
.I found a related issue at #49683, where it was suggested to use
pip install oldest-supported-numpy
maybe resolve the problem. However, this command installs numpy-1.21.6 and did not work for me.Fortunately, I received help from @Dr-Irv on Slack, who recommended using the following command:
mamba install numpy=1.23.2 -c conda-forge
. This solution worked for me.I spent a significant amount of time attempting various approaches without success. As a result, I am documenting this solution to assist anyone who may encounter a similar problem in the future, thereby saving them time and effort.
The text was updated successfully, but these errors were encountered: