I have created a conda environment dmtenv using anacondaprompt and have executed the following commands in activated testenv to be able to set my conda environment as a jupyter kernel (as by this post):
conda install -c conda-forge ipykernel
python -m ipykernel install --user --name dmtenv
After this, the kernel can be selected and runs, but when I try to import packages such as numpy or pandas it gives this error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~\anaconda3\envs\dmtenv\lib\site-packages\numpy\core\__init__.py in <module>
21 try:
---> 22 from . import multiarray
23 except ImportError as exc:
~\anaconda3\envs\dmtenv\lib\site-packages\numpy\core\multiarray.py in <module>
11
---> 12 from . import overrides
13 from . import _multiarray_umath
~\anaconda3\envs\dmtenv\lib\site-packages\numpy\core\overrides.py in <module>
6
----> 7 from numpy.core._multiarray_umath import (
8 add_docstring, implement_array_function, _get_implementing_args)
ImportError: DLL load failed while importing _multiarray_umath: Kan opgegeven module niet vinden.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-7-0aa0b027fcb6> in <module>
----> 1 import numpy as np
~\anaconda3\envs\dmtenv\lib\site-packages\numpy\__init__.py in <module>
143 from . import _distributor_init
144
--> 145 from . import core
146 from .core import *
147 from . import compat
~\anaconda3\envs\dmtenv\lib\site-packages\numpy\core\__init__.py in <module>
46 """ % (sys.version_info[0], sys.version_info[1], sys.executable,
47 __version__, exc)
---> 48 raise ImportError(msg)
49 finally:
50 for envkey in env_added:
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.9 from "C:\Users\maxzw\anaconda3\envs\dmtenv\python.exe"
* The NumPy version is: "1.20.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: Cannot find module.
I run python 3.9.5 and numpy 1.20.1. Importing packages does work from the base conda environment!
I really don't know what to do. Any help is greatly appreciated!
EDIT:
I've also tried nb_conda
, this gives me the same problem.