Python—RuntimeError: Numpy is not available

212 阅读1分钟

原因

这个错误信息表示你当前运行的环境中,某些模块是使用 NumPy 1.x 版本编译的,而你当前的 NumPy 版本是 2.0.0。由于版本不兼容,这些模块可能会崩溃或产生错误。

stackoverflow.com/questions/7…

解决方案

  1. 安装
pip uninstall numpy
pip install "numpy<2"
  1. Faced same error while writing code in Notebook Fix : Restart the Kernel. 如何重启Kernel