1

I've happily used PyCharm professional for a while. Following a fresh reinstall of miniconda and PyCharm, importing numpy in any conda environment leads to the following error:

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.

The python interpreter is set properly (and is printed at the top of the PyCharm console). Importing numpy works just fine outside of PyCharm.

Does anyone have any insights as to why this is now happening?

Python 3.7 with numpy 1.15.2 and PyCharm professional 2018.2.4 on Windows 10.

Thanks!

adamltyson
  • 43
  • 1
  • 7

2 Answers2

1

This is most probably a compatibility issue, try the following:

pip uninstall numpy
pip install numpy --upgrade
emirc
  • 1,948
  • 1
  • 23
  • 38
1

You are launching pycharm from an unactivated environment, this is not supported. Probably you have not added miniconda to path. I had the same problem. You have two options: You could re-install miniconda and "Add to path" In installation (Which is not recommended by conda), OR boot pycharm from the miniconda prompt in which you activated your enviornment. A detailed solution to the problem can be found here: https://github.com/conda/conda/issues/7833

Psychotechnopath
  • 2,471
  • 5
  • 26
  • 47
  • 1
    Thanks! This solved the issue, but do you know if something has changed recently? I have two other machines with PyCharm running fine with conda envs, and none of them have miniconda added to the path. – adamltyson Oct 10 '18 at 14:46
  • 1
    You´re welcome. I do not know, I first was able to do this as well but as of recently I got the error. But in the github bug-report, a developer simply told me that they are not responsible for third-party application behavior (pyCharm), and that using pycharm from an unactivated environment is unsupported, so they are not responsible for any errors you might get. – Psychotechnopath Oct 10 '18 at 16:07
  • I suspect something did change, but on the conda or PyCharm side, I'm not sure which. I started seeing this error around the same time (Oct '18). – stormont Feb 16 '19 at 00:17