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

Fix pandas dependency #3572

Closed
wants to merge 2 commits into from
Closed

Fix pandas dependency #3572

wants to merge 2 commits into from

Conversation

95-martin-orion
Copy link
Collaborator

Error highlighted by @akushnarov: pandas requires NumPy >= 1.6.1 due to datetime64 dependency.

Error highlighted by @akushnarov: `pandas requires NumPy >= 1.6.1 due to datetime64 dependency`
@95-martin-orion 95-martin-orion requested review from cduck, vtomole and a team as code owners December 3, 2020 14:48
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Dec 3, 2020
numpy.random.default_rng was added in v1.17, so we can't go earlier than that.
@95-martin-orion
Copy link
Collaborator Author

95-martin-orion commented Dec 3, 2020

We use numpy.random.default_rng transitively via qiskit, and it was added in numpy 1.17, so that's our actual minimum version. The reason that numpy~=1.16 still passed our test suite is that ~= gets the latest compatible version (i.e. v1.*); however, it only guarantees that this version will be at least v1.16.

@95-martin-orion
Copy link
Collaborator Author

Okay, this is getting strange: numpy~=1.17 still gives the pandas requires NumPy >= 1.6.1 error.

I found this SO question which suggests that MacOS has a default numpy version that may be causing this. Recommended fix is pip install numpy --upgrade or manually deleting the default numpy install.

I can only assume that this didn't appear until now because of some change to pandas which increased its minimum numpy requirement.

@95-martin-orion
Copy link
Collaborator Author

Based on the explosion of package-version downloads in the logs and an apparent change from pip-20.2.4 to 20.3, I suspect this is actually caused by pypa/pip#9215. Closing in lieu of a more appropriate fix.

@95-martin-orion
Copy link
Collaborator Author

Closing in lieu of a more appropriate fix.

See #3574.

@mpharrigan
Copy link
Collaborator

Can we delete this branch?

@95-martin-orion 95-martin-orion deleted the pandas-depfix branch January 19, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants