Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred while starting the kernel #23136

Closed
ANJANAGHULE opened this issue Dec 2, 2024 · 1 comment
Closed

An error occurred while starting the kernel #23136

ANJANAGHULE opened this issue Dec 2, 2024 · 1 comment

Comments

@ANJANAGHULE
Copy link

Description

What steps will reproduce the problem?

An error occurred while starting the kernel error

Traceback

Traceback (most recent call last):
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\__init__.py", line 23, in <module>
    from . import multiarray
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\multiarray.py", line 10, in <module>
    from . import overrides
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\overrides.py", line 8, in <module>
    from numpy._core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\__init__.py", line 49, in <module>
    raise ImportError(msg)
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.10 from "C:\Users\Anjana\anaconda3\envs\ML_env\pythonw.exe"
  * The NumPy version is: "1.22.3"

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: The specified module could not be found.

Traceback (most recent call last):
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\__init__.py", line 23, in <module>
    from . import multiarray
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\multiarray.py", line 10, in <module>
    from . import overrides
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\overrides.py", line 8, in <module>
    from numpy._core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anjana\anaconda3\envs\ML_env\lib\site-packages\numpy\_core\__init__.py", line 49, in <module>
    raise ImportError(msg)
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.10 from "C:\Users\Anjana\anaconda3\envs\ML_env\pythonw.exe"
  * The NumPy version is: "1.22.3"

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: The specified module could not be found.

Versions

  • Spyder version: 6.0.1 (conda)
  • Python version: 3.10.13 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.10
  • Operating System: Windows-10-10.0.22631-SP0

Dependencies

# Mandatory:
aiohttp >=3.9.3                  :  3.10.5 (OK)
asyncssh >=2.14.0,<3.0.0         :  2.17.0 (OK)
atomicwrites >=1.2.0             :  1.4.0 (OK)
chardet >=2.0.0                  :  4.0.0 (OK)
cloudpickle >=0.5.0              :  3.0.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20200713 (OK)
github >=2.3.0                   :  2.4.0 (OK)
importlib_metadata >=4.6.0       :  8.5.0 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.27.0 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  1.0.1 (OK)
jsonschema >=3.2.0               :  4.23.0 (OK)
keyring >=17.0.0                 :  24.3.1 (OK)
nbconvert >=4.0                  :  7.16.4 (OK)
numpydoc >=0.6.0                 :  1.7.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.3 (OK)
pexpect >=4.4.0                  :  4.8.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  5.9.0 (OK)
pygments >=2.0                   :  2.15.1 (OK)
pylint >=3.1,<4                  :  3.2.7 (OK)
pylint_venv >=3.0.2              :  3.0.3 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.12.0,<1.13.0           :  1.12.0 (OK)
pylsp_black >=2.0.0,<3.0.0       :  2.0.0 (OK)
pyuca >=1.2                      :  1.2 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.2 (OK)
qtawesome >=1.3.1,<1.4.0         :  1.3.1 (OK)
qtconsole >=5.6.0,<5.7.0         :  5.6.0 (OK)
qtpy >=2.4.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.0.1 (OK)
setuptools >=49.6.0              :  75.1.0 (OK)
sphinx >=0.6.6                   :  7.3.7 (OK)
spyder_kernels >=3.0.0,<3.1.0    :  3.0.0 (OK)
superqt >=0.6.2,<1.0.0           :  0.6.7 (OK)
textdistance >=4.2.0             :  4.6.2 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  4.0.1 (OK)
yarl >=1.9.4                     :  1.18.0 (OK)
zmq >=24.0.0                     :  25.1.2 (OK)

# Optional:
cython >=0.21                    :  None (NOK)
matplotlib >=3.0.0               :  None (NOK)
numpy >=1.7                      :  1.22.3 (OK)
pandas >=1.1.1                   :  None (NOK)
scipy >=0.17.0                   :  1.7.3 (OK)
sympy >=0.7.3                    :  None (NOK)

Environment

Environment
# packages in environment at C:\Users\Anjana\anaconda3\envs\ML_env:
#
# Name                    Version                   Build  Channel
abseil-cpp                20211102.0           hd77b12b_0  
absl-py                   2.1.0           py310haa95532_0  
aiohappyeyeballs          2.4.3           py310haa95532_0  
aiohttp                   3.10.5          py310h827c3e9_0  
aiosignal                 1.2.0              pyhd3eb1b0_0  
alabaster                 0.7.16          py310haa95532_0  
arrow                     1.3.0           py310haa95532_0  
astroid                   3.2.4           py310haa95532_0  
asttokens                 2.0.5              pyhd3eb1b0_0  
astunparse                1.6.3                      py_0  
async-timeout             4.0.3           py310haa95532_0  
asyncssh                  2.17.0          py310haa95532_0  
atomicwrites              1.4.0                      py_0  
attrs                     24.2.0          py310haa95532_0  
autopep8                  2.0.4              pyhd3eb1b0_0  
babel                     2.11.0          py310haa95532_0  
beautifulsoup4            4.12.3          py310haa95532_0  
binaryornot               0.4.4              pyhd3eb1b0_1  
black                     24.8.0          py310haa95532_0  
blas                      1.0                         mkl  
bleach                    6.2.0           py310haa95532_0  
blinker                   1.6.2           py310haa95532_0  
brotli-python             1.0.9           py310hd77b12b_8  
bzip2                     1.0.8                h2bbff1b_6  
c-ares                    1.19.1               h2bbff1b_0  
ca-certificates           2024.11.26           haa95532_0  
cachetools                5.3.3           py310haa95532_0  
certifi                   2024.8.30       py310haa95532_0  
cffi                      1.17.1          py310h827c3e9_0  
chardet                   4.0.0           py310haa95532_1003  
charset-normalizer        3.4.0                    pypi_0    pypi
click                     8.1.7           py310haa95532_0  
cloudpickle               3.0.0           py310haa95532_0  
colorama                  0.4.6           py310haa95532_0  
comm                      0.2.1           py310haa95532_0  
contourpy                 1.3.1                    pypi_0    pypi
cookiecutter              2.6.0           py310haa95532_0  
cryptography              41.0.3          py310h3438e0d_0  
cycler                    0.12.1                   pypi_0    pypi
debugpy                   1.6.7           py310hd77b12b_0  
decorator                 5.1.1              pyhd3eb1b0_0  
defusedxml                0.7.1              pyhd3eb1b0_0  
deprecated                1.2.13          py310haa95532_0  
diff-match-patch          20200713           pyhd3eb1b0_0  
dill                      0.3.8           py310haa95532_0  
docstring-to-markdown     0.11            py310haa95532_0  
docutils                  0.18.1          py310haa95532_3  
exceptiongroup            1.2.0           py310haa95532_0  
executing                 0.8.3              pyhd3eb1b0_0  
fftw                      3.3.9                h2bbff1b_2  
flake8                    7.1.1           py310haa95532_0  
flatbuffers               2.0.0                h6c2663c_0  
fonttools                 4.55.0                   pypi_0    pypi
frozenlist                1.5.0           py310h827c3e9_0  
gast                      0.6.0                    pypi_0    pypi
giflib                    5.2.2                h7edc060_0  
google-auth               2.29.0          py310haa95532_0  
google-auth-oauthlib      0.4.4              pyhd3eb1b0_0  
google-pasta              0.2.0              pyhd3eb1b0_0  
grpc-cpp                  1.48.2               hf108199_0  
grpcio                    1.68.0                   pypi_0    pypi
h5py                      3.12.1          py310h3b2c811_0  
hdf5                      1.12.1               h51c971a_3  
icc_rt                    2022.1.0             h6049295_2  
icu                       58.2                 ha925a31_3  
idna                      3.10                     pypi_0    pypi
imagesize                 1.4.1           py310haa95532_0  
importlib-metadata        8.5.0           py310haa95532_0  
importlib_metadata        8.5.0                hd3eb1b0_0  
inflection                0.5.1           py310haa95532_0  
intel-openmp              2021.4.0          haa95532_3556  
intervaltree              3.1.0              pyhd3eb1b0_0  
ipykernel                 6.29.5          py310haa95532_0  
ipython                   8.27.0          py310haa95532_0  
isort                     5.13.2          py310haa95532_0  
jaraco.classes            3.2.1              pyhd3eb1b0_0  
jedi                      0.19.1          py310haa95532_0  
jellyfish                 1.0.1           py310h8ecf97c_1  
jinja2                    3.1.4           py310haa95532_1  
joblib                    1.4.2                    pypi_0    pypi
jpeg                      9e                   h827c3e9_3  
jsonschema                4.23.0          py310haa95532_0  
jsonschema-specifications 2023.7.1        py310haa95532_0  
jupyter_client            8.6.0           py310haa95532_0  
jupyter_core              5.7.2           py310haa95532_0  
jupyterlab_pygments       0.2.2           py310haa95532_0  
keras                     3.7.0                    pypi_0    pypi
keras-base                2.6.0              pyhd3eb1b0_0  
keras-preprocessing       1.1.2              pyhd3eb1b0_0  
keyring                   24.3.1          py310haa95532_0  
kiwisolver                1.4.7                    pypi_0    pypi
krb5                      1.20.1               h5b6d351_1  
libclang                  18.1.1                   pypi_0    pypi
libclang13                14.0.6          default_h8e68704_1  
libcurl                   8.9.1                h0416ee5_0  
libffi                    3.4.4                hd77b12b_1  
libpng                    1.6.39               h8cc25b3_0  
libpq                     12.15                hb652d5d_1  
libprotobuf               3.20.3               h23ce68f_0  
libsodium                 1.0.18               h62dcd97_0  
libspatialindex           1.9.3                h6c2663c_0  
libssh2                   1.10.0               hcd4344a_2  
lz4-c                     1.9.4                h2bbff1b_1  
markdown                  3.7                      pypi_0    pypi
markdown-it-py            3.0.0                    pypi_0    pypi
markupsafe                3.0.2                    pypi_0    pypi
matplotlib                3.9.3                    pypi_0    pypi
matplotlib-inline         0.1.6           py310haa95532_0  
mccabe                    0.7.0              pyhd3eb1b0_0  
mdurl                     0.1.2                    pypi_0    pypi
mistune                   2.0.4           py310haa95532_0  
mkl                       2021.4.0           haa95532_640  
mkl-service               2.4.0           py310h2bbff1b_0  
mkl_fft                   1.3.1           py310ha0764ea_0  
mkl_random                1.2.2           py310h4ed8f06_0  
ml-dtypes                 0.4.1                    pypi_0    pypi
more-itertools            10.3.0          py310haa95532_0  
multidict                 6.1.0           py310h827c3e9_0  
mypy_extensions           1.0.0           py310haa95532_0  
namex                     0.0.8                    pypi_0    pypi
nbclient                  0.8.0           py310haa95532_0  
nbconvert                 7.16.4          py310haa95532_0  
nbformat                  5.10.4          py310haa95532_0  
nest-asyncio              1.6.0           py310haa95532_0  
numpy                     2.0.2                    pypi_0    pypi
numpy-base                1.22.3          py310h206c741_0  
numpydoc                  1.7.0           py310haa95532_0  
oauthlib                  3.2.2           py310haa95532_0  
openssl                   1.1.1w               h2bbff1b_0  
opt-einsum                3.4.0                    pypi_0    pypi
opt_einsum                3.3.0              pyhd3eb1b0_1  
optree                    0.13.1                   pypi_0    pypi
packaging                 24.2                     pypi_0    pypi
pandas                    2.2.3                    pypi_0    pypi
pandocfilters             1.5.0              pyhd3eb1b0_0  
parso                     0.8.3              pyhd3eb1b0_0  
pathspec                  0.10.3          py310haa95532_0  
pexpect                   4.8.0              pyhd3eb1b0_3  
pickleshare               0.7.5           pyhd3eb1b0_1003  
pillow                    11.0.0                   pypi_0    pypi
pip                       24.2            py310haa95532_0  
platformdirs              3.10.0          py310haa95532_0  
pluggy                    1.0.0           py310haa95532_1  
ply                       3.11            py310haa95532_0  
prompt-toolkit            3.0.43          py310haa95532_0  
prompt_toolkit            3.0.43               hd3eb1b0_0  
propcache                 0.2.0           py310h827c3e9_0  
protobuf                  5.29.0                   pypi_0    pypi
psutil                    5.9.0           py310h2bbff1b_0  
ptyprocess                0.7.0              pyhd3eb1b0_2  
pure_eval                 0.2.2              pyhd3eb1b0_0  
pyasn1                    0.4.8              pyhd3eb1b0_0  
pyasn1-modules            0.2.8                      py_0  
pycodestyle               2.12.1          py310haa95532_0  
pycparser                 2.21               pyhd3eb1b0_0  
pydocstyle                6.3.0           py310haa95532_0  
pyflakes                  3.2.0           py310haa95532_0  
pygithub                  2.4.0           py310haa95532_0  
pygments                  2.18.0                   pypi_0    pypi
pyjwt                     2.9.0           py310haa95532_0  
pylint                    3.2.7           py310haa95532_0  
pylint-venv               3.0.3           py310haa95532_0  
pyls-spyder               0.4.0              pyhd3eb1b0_0  
pynacl                    1.5.0           py310h8cc25b3_0  
pyopenssl                 23.2.0          py310haa95532_0  
pyparsing                 3.2.0                    pypi_0    pypi
pyqt                      5.15.10         py310hd77b12b_0  
pyqt5-sip                 12.13.0         py310h2bbff1b_0  
pyqtwebengine             5.15.10         py310hd77b12b_0  
pysocks                   1.7.1           py310haa95532_0  
python                    3.10.13              h966fe2a_0  
python-dateutil           2.9.0post0      py310haa95532_2  
python-fastjsonschema     2.20.0          py310haa95532_0  
python-flatbuffers        24.3.25         py310haa95532_0  
python-lsp-black          2.0.0           py310haa95532_0  
python-lsp-jsonrpc        1.1.2              pyhd3eb1b0_0  
python-lsp-server         1.12.0          py310h9909e9c_0  
python-slugify            5.0.2              pyhd3eb1b0_0  
pytoolconfig              1.2.6           py310haa95532_0  
pytz                      2024.2                   pypi_0    pypi
pyuca                     1.2             py310haa95532_1  
pywin32                   305             py310h2bbff1b_0  
pywin32-ctypes            0.2.2           py310haa95532_0  
pyyaml                    6.0.2           py310h827c3e9_0  
pyzmq                     25.1.2          py310hd77b12b_0  
qdarkstyle                3.2.3              pyhd3eb1b0_0  
qstylizer                 0.2.2                    pypi_0    pypi
qt-main                   5.15.2               h6072711_9  
qt-webengine              5.15.9               h5bd16bc_7  
qtawesome                 1.3.1           py310haa95532_0  
qtconsole                 5.6.0           py310haa95532_0  
qtpy                      2.4.1           py310haa95532_0  
re2                       2022.04.01           hd77b12b_0  
referencing               0.30.2          py310haa95532_0  
requests                  2.32.3          py310haa95532_1  
requests-oauthlib         2.0.0           py310haa95532_0  
rich                      13.9.4          py310haa95532_0  
rope                      1.12.0          py310haa95532_0  
rpds-py                   0.10.6          py310h636fa0f_1  
rsa                       4.7.2              pyhd3eb1b0_1  
rtree                     1.0.1           py310h2eaa2aa_0  
scikit-learn              1.5.2                    pypi_0    pypi
scipy                     1.14.1                   pypi_0    pypi
seaborn                   0.13.2                   pypi_0    pypi
setuptools                75.1.0          py310haa95532_0  
sip                       6.7.12          py310hd77b12b_0  
six                       1.16.0             pyhd3eb1b0_1  
snappy                    1.2.1                hcdb6601_0  
snowballstemmer           2.2.0              pyhd3eb1b0_0  
sortedcontainers          2.4.0              pyhd3eb1b0_0  
soupsieve                 2.5             py310haa95532_0  
sphinx                    7.3.7           py310h827c3e9_0  
sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0  
sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0  
sphinxcontrib-htmlhelp    2.0.0              pyhd3eb1b0_0  
sphinxcontrib-jsmath      1.0.1              pyhd3eb1b0_0  
sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0  
sphinxcontrib-serializinghtml 1.1.10          py310haa95532_0  
spyder                    6.0.1           py310haa95532_0  
spyder-kernels            3.0.0           py310h9909e9c_0  
sqlite                    3.45.3               h2bbff1b_0  
stack_data                0.2.0              pyhd3eb1b0_0  
superqt                   0.6.7           py310h9909e9c_0  
tabulate                  0.9.0           py310haa95532_0  
tensorboard               2.18.0                   pypi_0    pypi
tensorboard-data-server   0.7.2                    pypi_0    pypi
tensorboard-plugin-wit    1.8.1           py310haa95532_0  
tensorflow                2.18.0                   pypi_0    pypi
tensorflow-base           2.9.1           eigen_py310he3c91d7_1  
tensorflow-estimator      2.9.0           py310haa95532_0  
tensorflow-intel          2.18.0                   pypi_0    pypi
tensorflow-io-gcs-filesystem 0.31.0                   pypi_0    pypi
termcolor                 2.5.0                    pypi_0    pypi
text-unidecode            1.3                pyhd3eb1b0_0  
textdistance              4.6.3           py310h9909e9c_0  
threadpoolctl             3.5.0                    pypi_0    pypi
three-merge               0.1.1              pyhd3eb1b0_0  
tinycss2                  1.2.1           py310haa95532_0  
tk                        8.6.14               h0416ee5_0  
tomli                     2.0.1           py310haa95532_0  
tomlkit                   0.13.2          py310haa95532_0  
tornado                   6.4.1           py310h827c3e9_0  
traitlets                 5.14.3          py310haa95532_0  
typing-extensions         4.12.2                   pypi_0    pypi
typing_extensions         4.11.0          py310haa95532_0  
tzdata                    2024.2                   pypi_0    pypi
ujson                     5.10.0          py310h5da7b33_0  
unidecode                 1.3.8           py310haa95532_0  
urllib3                   2.2.3           py310haa95532_0  
vc                        14.40                h2eaa2aa_1  
vs2015_runtime            14.40.33807          h98bb1dd_1  
watchdog                  4.0.1           py310haa95532_0  
wcwidth                   0.2.5              pyhd3eb1b0_0  
webencodings              0.5.1           py310haa95532_1  
werkzeug                  3.1.3                    pypi_0    pypi
whatthepatch              1.0.2           py310haa95532_0  
wheel                     0.44.0          py310haa95532_0  
win_inet_pton             1.1.0           py310haa95532_0  
wrapt                     1.17.0                   pypi_0    pypi
xz                        5.4.6                h8cc25b3_1  
yaml                      0.2.5                he774522_0  
yapf                      0.40.2          py310haa95532_0  
yarl                      1.18.0          py310h827c3e9_0  
zeromq                    4.3.5                hd77b12b_0  
zipp                      3.21.0          py310haa95532_0  
zlib                      1.2.13               h8cc25b3_1  
zstd                      1.5.6                h8880b57_0  

@ccordoba12
Copy link
Member

Hey @ANJANAGHULE, thanks for reporting. This problem is usually caused by installing Numpy, or a package that depends on it, with pip in a conda environment. Since pip and conda packages are binary incompatible, they can't be mixed in the same environment.

To solve it, I'm afraid you'll have to remove and reinstall Anaconda. To properly do that, please follow the instructions in the second part of our video about that (the first part describes why you can't mix pip and conda packages).

@ccordoba12 ccordoba12 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants