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.

Errors when attempting to connect to local spyder-kernels in different conda envs

See original GitHub issue

Description

I followed the instructions I wrote in the Connecting to a console section of the docs to attempt to get a screenshot of the process for the 3.3.0 release blog post. However, I was unable to do so due to an error, which occured on two different Windows machines (one Windows 8.1, one Windows 10) with two different Anaconda installs and sets of fresh, clean conda environments, including one after running spyder --reset, and after fully disabling my firewall and any other security software.

To note, I am able to create and use new kernels in other conda environments, including the same one tested above and with working completion, Variable Explorer, inline plotting, etc if I follow the procedure from the new Working with Packages and Environments wiki page from spyder-ide/spyder-docs#54 instead. Specifically, I change the Python interpreter in the Spyder preferences to the one for that environment, and then launch a new kernel with the “Open a new IPython console” as normal, and everything works normally.

What steps will reproduce the problem?

Specifically, I attempted the following steps:

  1. Install the Spyder 3.3.0 package and dependencies from conda-forge into a fresh, clean conda environment
conda create -n spyder-test python=3.6
activate spyder-test
conda install -c conda-forge spyder
spyder
  1. From a seperate Anaconda Prompt instance, install the correct version of the spyder-kernels package from conda-forge into a seperate, fresh/clean conda environment and start a kernel
conda create -n kernel-test python=3.6
activate kernel-test
conda install -c conda-forge spyder-kernels=0
python -m spyder_kernels.console
  1. In Spyder, open the “Connect to existing kernel”, select the correct connection file as indicated by the running kernel, and click OK.

This error then occurs.

Traceback

  File "C:\Anaconda3\envs\spyder-test\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1108, in create_client_for_kernel
    password)
  File "C:\Anaconda3\envs\spyder-test\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1800, in _create_client_for_kernel
    client.shellwidget.kernel_client = kernel_client
  File "C:\Anaconda3\envs\spyder-test\lib\site-packages\qtconsole\base_frontend_mixin.py", line 57, in kernel_client
    kernel_client.iopub_channel.message_received.connect(self._dispatch)
AttributeError: 'QtKernelClient' object has no attribute 'iopub_channel'

Versions

  • Spyder version: 3.3.0
  • Python version: 3.6.6
  • Qt version: 5.9.4
  • PyQt5 version: 5.9.2
  • Operating System: Windows 8.1

Dependencies

pyflakes >=0.6.0  :  2.0.0 (OK)
pycodestyle >=2.3 :  2.4.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.7.5 (OK)
rope >=0.9.4      :  0.10.7 (OK)
jedi >=0.9.0      :  0.12.0 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  0.23.1 (OK)
numpy >=1.7       :  1.13.3 (OK)
sympy >=0.7.3     :  1.1.1 (OK)
cython >=0.21     :  0.28.3 (OK)
qtconsole >=4.2.0 :  4.3.1 (OK)
IPython >=4.0     :  6.4.0 (OK)
matplotlib >=2.0.0:  2.2.2 (OK)
pylint >=0.25     :  1.9.2 (OK)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Jul 17, 2018

The fix for this was really simple, but it took me so long to implement it because I thought it was a problem in jupyter-client, not in Spyder, so I was waiting to report it there.

1reaction
CAM-Gerlachcommented, Jul 17, 2018

Yup, its a duplicate—my fault, thanks @dalthviz . That’s what I get for not keeping up with the bug tracker for the past few weeks, and then not “eating my own dogfood” as we say and not searching for the error…no idea why doing so just slipped my mind; I guess I was just so used to seeing every error that came in before that I didn’t bother to check.

The fix was just committed a few hours before I tried it, and after pulling the latest changes from the repo and running from that, everything works perfectly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Illnesses — Spyder 5 documentation
Errors starting the kernel¶. If you receive the message An error occurred while starting the kernel in the IPython Console, Spyder was unable...
Read more >
Upgraded to Spyder 5 IDE for Python; Missing spyder-kernels
When i open it I get the error message: The Python environment or installation......doesn't have the spyder‑kernels module or the right version ...
Read more >
MNE, Spyder, and CUPY - Support & Discussions
Hi all, I'm installing MNE for the first time in Anaconda following these instructions: Install via pip or conda — MNE 1.2.2 documentation....
Read more >
Installing spyder in Arcgis Pro 2.9 - Esri Community
I updated to Arcgis Pro 2.9 and now I am unable to use spyder. ... The behavior of conda when trying to install...
Read more >
conda install spyder stuck on solving environment - You.com
Probably your Environment is broken somehow. I suggest you to create a new environment specifying conda-forge as a channel already at creation time:...
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