Numpy import error in PyCharm (Importing the multiarray numpy extension module failed)

Completed

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!

11 comments

Hi Adam,

Thank you for contacting PyCharm support.

Have you tried to reinstall numpy? Does the problem remain? 

Kind regards,

Sergey

 

0

Hi Sergey,

Reinstalling of numpy/miniconda/PyCharm didn't solve it, but adding miniconda to the path fixed it.

This seems weird though, because I've got a couple of other systems that work fine with the exact same conda environments without adding miniconda to the path.

Thanks,

Adam

0

Hi Sergey,

Reinstalling of numpy/miniconda/PyCharm didn't solve it, but adding miniconda to the path fixed it.

This seems weird though, because I've got a couple of other systems that work fine with the exact same conda environments without adding miniconda to the path.

Thanks,

Adam

0

Thanks for letting me know!

Feel free to contact us if you ever have any questions or problems.

0

I also encountered this issue on windows 10. I just downgraded to python 3.6 and numpy 1.12 to resolve the problem as it is preferable to the solution mentioned above of adding miniconda to the path. Note that I was able to use python 3.7 with numpy 1.15 in an anaconda console just fine. It was just scripts run from within pycharm that could not import numpy.

0

I am having the same problem. Just installed pycharm 2018.2.4(professional edition) on Windows 10 with Anaconda3. I tried adding anaconda to my path but that did not fix the problem for me.

Is there something else I can try or is there an update on this issue?

 

Thanks.

0

Hi Jharbaughx42,

There is a related issue in our issue tracker https://youtrack.jetbrains.com/issue/PY-27234, please vote for it and follow for updates.

0

After looking to these resources:

https://youtrack.jetbrains.com/issue/PY-27234

https://github.com/numpy/numpy/issues/12395

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360001224859-Pycharm-fails-to-import-numpy-and-snappy-using-anaconda-environment

I see that mainly the problem is related to the required Anaconda3\Library\bin or C:\Anaconda3\env\ENVNAME\Library\bin

is there a workaround that doesnt relate to launch pycharm from an activated anaconda env? like generate and append the paths to the current anaconda enviroment at the moment of start the python console?

0

Hi A00799342,

A workaround could be:

- run print(os.environ['PATH']) in the system terminal using the same interpreter

- copy the result and add them as PATH environment variable to your Run/Debug Configuration

- do the same for Python Console settings to get it working too.

0

the problem has not been solved 

I use 

Anaconda3-2018.12-Windows-x86_64 and 

pycharm-professional-2018.3.2

and got this:

"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']

May I ask you that how to solve this issue? Thank you very much

0

Hi Lithium,

Does it happen when you run your script? Please attach a screenshot showing the problem or the whole console output.

Edit: I can see your another report https://intellij-support.jetbrains.com/hc/en-us/community/posts/360002481520
Let's move there.

0

Please sign in to leave a comment.