Home > Software design >  Resolve warning "A NumPy version >=1.16.5 and <1.23.0 is required for this version of Sci
Resolve warning "A NumPy version >=1.16.5 and <1.23.0 is required for this version of Sci

Time:07-23

When I import SciPy or a library dependent on it, I receive the following warning message:

UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.1

It's true that I am running NumPy version 1.23.1, however this message is a mystery to me since I am running SciPy version 1.7.3, which, according to SciPy's documentation, is compatible with NumPy <1.24.0.

Anyone having this problem or know how to resolve it?

I am using Conda as an environment manager, and all my packages are up to date as far as I know.

  • python: 3.9.12
  • numpy: 1.23.1
  • scipy: 1.7.3

Thanks in advance if anyone has any clues !

CodePudding user response:

According to the setup.py file of the scipy 1.7.3, numpy is indeed <1.23.0. As @Libra said, the docs must be incorrect. You can:

  1. Ignore this warning
  2. Use scipy 1.8
  3. Use numpy < 1.23.0
  • Related