question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spyder-kernels = 2.3.1 not working

See original GitHub issue

Problem Description

I created a new conda environment (using miniconda) with python=3.9 and installed spyder-kernels=2.3.1 from conda-forge to be able to sue this new environment in the spyder standalone app (v5.3.1) in Windows 11, however, I get the following error in the console when starting Spyder:

Traceback (most recent call last):
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\spyder_kernels\console\__main__.py", line 22, in
from spyder_kernels.console import start
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\spyder_kernels\console\start.py", line 21, in
import ipykernel
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\ipykernel\__init__.py", line 5, in
from .connect import * # noqa
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\ipykernel\connect.py", line 11, in
import jupyter_client
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\jupyter_client\__init__.py", line 8, in
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\jupyter_client\asynchronous\__init__.py", line 1, in
from .client import AsyncKernelClient # noqa
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\jupyter_client\asynchronous\client.py", line 6, in
from jupyter_client.channels import HBChannel
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\jupyter_client\channels.py", line 12, in
import zmq.asyncio
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\zmq\__init__.py", line 103, in
from zmq import backend
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\zmq\backend\__init__.py", line 31, in
raise original_error from None
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\zmq\backend\__init__.py", line 26, in
_ns = select_backend(first)
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\zmq\backend\select.py", line 31, in select_backend
mod = import_module(name)
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Gebruiker\miniconda3\envs\miguel_spyder\lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (
ImportError: DLL load failed while importing _device: The specified module could not be found.

Versions

  • Conda version: 4.13.0
  • Spyder version: 5.3.1
  • Python version: 3.9.12
  • Operating System name/version: Windows 11

Any ideas how to solve this problem?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dalthvizcommented, Jul 21, 2022

Thank you for the new info @Superberti ! Glad is working for you 👍 And yes to get the up to date version of Spyder-kernels and Spyder you need to use the conda-forge channel. The thing is that the default anaconda channel just goes up to Spyder 5.1.5 and Spyder-kernels 2.2.1

Since this seems more like a specific miniconda/conda setup issue I will close this one but if you have more info regarding this let us know!

0reactions
Superberticommented, Jul 21, 2022

So I’ve found the reason! I invested some time with the famous ProcessMonitor to see what dll is missing (unfortunately the error message doesn’t help as it hides the dll name). So the python process tries to load “ffi.dll” from various places but this fails as the installed (by conda) dll has the name “ffi-8.dll”. Renaming this dll to “ffi.dll” solves the problem and I’m able to use the environment in spyder again. But it also looks that I’ve to install the spyder-kernels from conda-forge, right?

Bye, Oliver

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask me to install spyder-kernels, but doesn't work after the ...
Problem Description. The Python environment or installation whose interpreter is located at. C:\Users\miraboreasu\Miniconda3\envs\spyder‑env\ ...
Read more >
Common Illnesses — Spyder 5 documentation
If you receive the message An error occurred while starting the kernel in the IPython Console, Spyder was unable to launch a new...
Read more >
Upgraded to Spyder 5 IDE for Python; Missing spyder-kernels
0). The instructions to fix this suggest installing the missing kernals using. conda install spyder-kernels=2.3 or pip install spyder-kernels ...
Read more >
Spyder Kernels - :: Anaconda.org
Provides Jupyter kernels for use with the consoles of Spyder, the Scientific Python Development Environment. These can launched either through Spyder itself ...
Read more >
spyder-kernels - PyPI
Package that provides Jupyter kernels for use with the consoles of Spyder, the Scientific Python Development Environment. These kernels can launched either ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found