This error message indicates a version conflict between your installed packages. The first line shows that SciPy requires a NumPy version less than 1.27.0 but greater than or equal to 1.19.5. However, you have NumPy version 1.17.4 installed, which is incompatible. Similarly, the second line indicates that Matplotlib requires a NumPy version less than 2.0 but greater than or equal to 1.20. Your installed NumPy version 1.17.4 doesn't meet this requirement either.

To resolve this issue, upgrade your NumPy package to a version satisfying both requirements. Run the following command:

!pip install numpy==1.20.0

This will install NumPy version 1.20.0, compatible with both SciPy and Matplotlib. After installing the updated NumPy version, you should be able to use these packages without any compatibility issues.

解决 Python 中 SciPy 和 Matplotlib 的 NumPy 版本冲突

原文地址: https://www.cveoy.top/t/topic/eYJb 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录