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

BUILD: ValueError raised when importing pandas due to numpy.ndarray size change #54178

Closed
1 task done
luke396 opened this issue Jul 18, 2023 · 1 comment
Closed
1 task done
Labels
Build Library building on various platforms Usage Question

Comments

@luke396
Copy link
Contributor

luke396 commented Jul 18, 2023

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 command python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true.

However, when attempting to import pandas using either pytest pandas or import 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.

@luke396 luke396 added Build Library building on various platforms Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 18, 2023
@munneb10
Copy link

I recommend you to setup using Conda it will be work seamlessly. I have also tried mamba it does'nt work fine

@lithomas1 lithomas1 added Usage Question and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 18, 2023
@luke396 luke396 closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Usage Question
Projects
None yet
Development

No branches or pull requests

3 participants