21

I updated to the latest version of Spyder (5.1.5) and my debugger hangs w/o response on the first line, no matter the code.

Spyder debugger hang

Here are the dependency versions:

  • Spyder 5.1.5
  • spyder-kernel 2.1.1
  • Python 3.9.7
  • IPython 7.31.1

I remember having this problem a while ago that was fixed by updating the Spyder Kernel, but no dice this time through.

Any solutions?

Devin
  • 341
  • 1
  • 3
  • 6

5 Answers5

22

If you are not using Anaconda, you can update Spyder with the following command

pip install -U spyder

If not, please close Spyder, open the Anaconda Prompt (on Windows) or a terminal (on Linux or Mac) and run there

conda create -n spyder-env -c conda-forge spyder
conda activate spyder-env
spyder

You need to update because this is a known issue fixed in any Spyder version greater than 5.1.5.

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
Sina Mo
  • 321
  • 1
  • 3
2

I had the same problem on Windows10 with spyder version 5.1.5. To resolve the problem you need a version newer than 5.1.5. The thing is that if you update Spyder you have to install it from a channel other than the defaults channel in order to get a newer version than 5.1.5. This can be done in two ways:

Console

Open the console or, if you're working on Windows, the Anaconda Prompt, and type the following commands in order to first uninstall spyder, and then re-install the newest version (just updating didn't work for me).

conda remove -n myenv spyder
conda install -n myenv -c conda-forge spyder
  • The first command, remove, uninstalls spyder in the virtualenv called 'myenv'. If you don't use virtualenvs, just leave the -n myenv aside.
  • The second command, install installs spyder from the third-party channel conda-forge instead of the official channel defaults. This option is necessary in order to install a spyder version newer than 5.1.5

Anaconda Navigator

  • Uninstall Spyder: In the "Home" tab, select the correct virtual environment in the "Applications on" dropdown menu. Then click on the gear symbol in the upper right corner of the spyder tile and select "remove application".
  • Add conda-forge to your environment's channels: This is nicely described at the bottom of this page.
  • Install spyder again, in the way you did it the first time.
  • Click again on the gear on the spyder tile, choose "install specific version" in order to update to the newest version. Now, versions newer than 5.1.5 should be available.
ilja
  • 109
  • 7
  • What a mess. Adding conda-forge and removing spyder somehow led to Anaconda installing 173 new packages. About 500 MBytes. conda install -c conda-forge spyder – Tunneller Oct 04 '22 at 20:47
  • And now:: the system cannot find the path specified. C:\Users\johnl\anaconda3\envs\newFlask\lib\site‑packages\numpy\__init__.py:164: UserWarning: mkl‑service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out‑of‑the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl‑service package, see http://github.com/IntelPython/mkl‑service from . import _distributor_init .... blah... blah... blah.. – Tunneller Oct 04 '22 at 20:54
  • Ok, fixed. Deleted mkl. and removed channel conda-forge, then reinstalled and then got a bunch of conflicts, so then pip to "by-hand" upgrade some that it was complaining about and then did conda upgrade -c intel python about three times. And then all ok. And debugger is working now too!! – Tunneller Oct 04 '22 at 22:37
1

conda install qtconsole=5.1.1 do the magic https://github.com/spyder-ide/spyder/issues/17334

0

I had the same issue with Anaconda Navigator 2.1.4, and Spyder 5.3.2 using Python 3.9.13, and I solved it using the solution in the first answer above, ie. conda create -n spyder-env -c conda-forge spyder conda activate spyder-env spyder

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/32272063) – rachwa Jul 19 '22 at 14:02
0

This bug has been resolved in the version 5.2.2 of Spyder.

conda install -c conda-forge spyder=5.2.2

or

pip install spyder=5.2.2

Enjoy!!

Chandan
  • 430
  • 6
  • 9