Errors when attempting to connect to local spyder-kernels in different conda envs
See original GitHub issueDescription
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:
- 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
- From a seperate Anaconda Prompt instance, install the correct version of the
spyder-kernels
package fromconda-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
- 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:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
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.
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.