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

ModuleNotFoundError: No module named 'numpy.lib.histograms' #1156

Open
alexjdean opened this issue Jul 6, 2024 · 2 comments
Open

ModuleNotFoundError: No module named 'numpy.lib.histograms' #1156

alexjdean opened this issue Jul 6, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working

Comments

@alexjdean
Copy link

General Information:

  • OS: Sonoma 14.5
  • Python version: 3.9.10
  • Library version: 0.12.0

Describe the bug:
When attempting to setup a Python virtual environment, I run make setup per this Contribution guideline. When the Makefile executes pre-commit run, the check-manifest stage fails with an error of

ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last): [...]

ModuleNotFoundError: No module named 'numpy.lib.histograms'

I believe this to be a result of the latest NumPy 2.0.0 release as of three weeks ago.

To Reproduce:

Run make setup per this Contribution guideline.

Expected behavior:

The Python virtual environment should be successfully set up. Instead, I encounter this NumPy error.

Screenshots:

image

Additional context:

This is similar to #1154, however I encounter this issue when setting up the virtual environment rather than running a Python file that imports DataProfiler.

@mepwang
Copy link

mepwang commented Aug 23, 2024

I tried the following:

pip install -U numpy==1.26

it worked for me

@carlsonp
Copy link
Contributor

I also had to downgrade to numpy 1.X. I suspect the requirements.txt files will need to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants