Numpy no module/attribute 在导入依赖它的其他包时

Numpy no module/attribute when importing other packages depending on it

在 2 个不同的独立系统上,我有 Anaconda/Miniconda。在我的默认虚拟环境中,自 2018 年 8 月 15 日以来,当我导入 pandas 或 matplotlib 时,我分别收到错误 module 'numpy' has no attribute '__version__'module 'numpy' has no attribute 'square'

conda 或其中一个模块的更新可能造成损坏,但我无法弄清楚。计算机,一台是 Mac,一台是 Windows PC。唯一的共同点是我在两个系统上都使用 Jupyter Notebook 环境,都是默认环境,都可能安装了深度学习包(相对于其他仍然运行良好的环境),我一直在使用Jupyter Notebook 环境以在两者上进行编码。

有人遇到过这个问题吗?有解决办法吗?是否在等待修复更新?

我遇到了这个问题,我认为这与安装失败有关。我用 conda update --all 修复了我的问题。但我想你可以通过卸载 numpy 并重新安装来修复它。