我已经愉快地使用了一段时间的PyCharm专业版。在重新安装miniconda和PyCharm之后,在任何conda环境中导入numpy都会导致以下错误:
ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try 'git clean -xdf' (removes all files not under version control). Otherwise reinstall numpy. Original error was: DLL load failed: The specified module could not be found.
python解释器设置正确(并打印在PyCharm控制台的顶部)。在PyCharm之外,导入numpy工作得很好。
有没有人知道为什么现在会发生这种情况?
在Windows10上,Python3.7和numpy 1.15.2以及PyCharm专业版2018.2.4。
谢谢!
发布于 2018-10-10 19:26:00
这很可能是兼容性问题,请尝试以下方法:
pip uninstall numpy
pip install numpy --upgrade发布于 2018-10-10 20:08:28
您正在从未激活的环境启动pycharm,这是不受支持的。您可能还没有将miniconda添加到路径中。我也有同样的问题。您有两个选择:您可以在安装中重新安装miniconda并"Add to path“(conda不推荐这样做),或者从miniconda提示符下启动pycharm,在其中您激活了您的环境。这个问题的详细解决方案可以在这里找到:https://github.com/conda/conda/issues/7833
https://stackoverflow.com/questions/52738880
复制相似问题