PyCharm can't import numpy after fresh MiniConda install

I was previously using PyCharm for a project, but needed to replace my anaconda installation with a miniconda one. After installing, I'm able to run the conda environments on the command line, including numpy. However, when I attempt to debug my project, I'm greeted with the following error when importing numpy:

 

DLL load failed: The specified module could not be found.

the error suggests checking the following links: https://numpy.org/devdocs/user/troubleshooting-importerror.html, https://www.jetbrains.com/help/pycharm/conda-support-creating-conda-virtual-environment.html

 

I've read the documentation there and have taken the following steps:

x delete the .idea folder in my project

x installed and reinstalled numpy, as well as the whole miniconda environment

x added environment python.exe (at D:\miniconda3\envs\Chargers\python.exe, for what it's worth) as my project interpreter

 

Some other notes:

x On the project interpreter page, pycharm shows both numpy and numpy-base

x whenever I try to add a new environment, pycharm's suggested base interpreter points to the old conda environment, which is invalid (however, this shouldn't matter, because I'm using pythonthe 'Existing Environment' option

x Pycharm version: 2020.1.3

x Python version : 3.7.7

x Numpy version :1.18.5

 

UPDATE: 

I have also tried the solutions found here. There did not solve it. https://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error/60405693#60405693

1 comment
Comment actions Permalink

I reinstalled both PyCharm and Miniconda and moved miniconda to the C:\ drive. The combination of these two seemed to fix the problem, although I still don't have any idea what the original problem was caused by. 

0

Please sign in to leave a comment.