spyder: IPython console stuck restarting kernel when using different interpreter
Issue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder(orpip, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset - Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
IPython console is stuck ‘Restarting kernel’ when using interpreter of python environment separate to Spyder default installation.
What steps reproduce the problem?
- Install Spyder from standalone Windows executable
- Create new conda environment
spydertestand install latest spyder-kernels in this environment - In Spyder, select ‘Preferences -> Use following Python interpreter’ and then point to this dummy environment, i.e.
...Miniconda3/envs/spydertest/python.exe
What is the expected output? What do you see instead?
Using default interpreter, the IPython Console starts up and can execute code as normal.
Using the alternative python interpreter, in a separate conda environment, console doesn’t initialize and is stuck at Restarting kernel …

Versions
- Spyder version: 5.4.2
- Python version: (default in Spyder install = 3.8.10, in development env = 3.10.9)
- Qt version: 5.15.2
- PyQt version: 5.15.7
- Operating System name/version: Windows 10, 22H2
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.1 (OK)
chardet >=2.0.0 : 5.1.0 (OK)
cloudpickle >=0.5.0 : 2.2.0 (OK)
cookiecutter >=1.6.0 : 2.1.1 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree : None (OK)
IPython >=7.31.1;<9.0.0 : 8.8.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.2 (OK)
jellyfish >=0.7 : 0.9.0 (OK)
jsonschema >=3.2.0 : 4.17.3 (OK)
keyring >=17.0.0 : 23.13.1 (OK)
nbconvert >=4.0 : 7.2.8 (OK)
numpydoc >=0.6.0 : 1.5.0 (OK)
paramiko >=2.4.0 : 2.12.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.4 (OK)
pygments >=2.0 : 2.14.0 (OK)
pylint >=2.5.0;<3.0 : 2.15.10 (OK)
pylint_venv >=2.1.1 : 2.3.0 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.7.1;<1.8.0 : 1.7.1 (OK)
pylsp_black >=1.2.0 : 1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (OK)
qstylizer >=0.2.2 : 0.2.2 (OK)
qtawesome >=1.2.1 : 1.2.2 (OK)
qtconsole >=5.4.0;<5.5.0 : 5.4.0 (OK)
qtpy >=2.1.0 : 2.3.0 (OK)
rtree >=0.9.7 : 1.0.1 (OK)
setuptools >=49.6.0 : 66.0.0 (OK)
sphinx >=0.6.6 : 6.1.3 (OK)
spyder_kernels >=2.4.2;<2.5.0 : 2.4.2 (OK)
textdistance >=4.2.0 : 4.5.0 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog : 2.2.1 (OK)
zmq >=22.1.0 : 24.0.1 (OK)
# Optional:
cython >=0.21 : 0.29.33 (OK)
matplotlib >=3.0.0 : 3.6.3 (OK)
numpy >=1.7 : 1.24.1 (OK)
pandas >=1.1.1 : 1.5.2 (OK)
scipy >=0.17.0 : 1.10.0 (OK)
sympy >=0.7.3 : 1.11.1 (OK)
# Spyder plugins:
spyder_terminal.terminalplugin 1.2.2 : 1.2.2 (OK)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 25 (14 by maintainers)
@ccordoba12
I have been looking into this .bat issue on my system. It seems something may have been corrupted at some point in my Windows registry when uninstalling/installing Anaconda versions which introduced an ‘AutoRun’ entry to the command processor. This meant that I was unable to run cmd.exe without AutoRun and causing issues running .bat files.
I followed the steps outlined in the answer here:
https://stackoverflow.com/questions/66335300/cmd-crashes-with-exit-code-1-after-uninstalling-anaconda/66836989#66836989?newreg=d1a0080e93834699a82850420bf1672d
C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /fEssentially, deleted that registry entry for the Command Processor and now I am able to connect to a different interpreter no problem!
This has now appeared to have fixed my Spyder issue with kernel restarting when using different interpreter.
Thanks again for all your help and patience with this.
Great! I’m really glad you were finally able to solve your problem.
Closing this issue then.
Thanks for the instructions @dalthviz to restart via command line.
@ccordoba12 - I opened now in debug mode and attached the debug log here. I initially opened with default interpreter and then switched to the interpreter of the
test-1conda environment around 09:17:09,429.spyder-debug.log
Checked and the restart functionality is not working with the standalone installer on Windows