iPython console in Spyder does not enter in debug

123
March 30, 2022, at 7:10 PM

I removed and started with a fresh new installation of Anaconda. Just after installation I created a custom environment (cust_env) Both the cust_env and the base environment have Python 3.9. I then installed on both environments Spyder 5.1.

Now, the problem is the following:

If I run Spyder from the base environment, it seems to work and debug my code normally, while if I run it from the cust_env, when I enter in debug mode the console apparently does not answer anymore (the debug prompt does not appear and you must restart the kernel to have it back again).

I also tryed with different versions of Python (3.7.x and 3.8.x) and of Spyder (4.x, 3.x) and the behaviour looks identical.

I cannot understand what might be the difference which does not allow to use Spyder in an environment different to the base one.

Answer 1

I was able to delimit the problem and find a workaround.

The base problem is that, when you create a new environment of Anaconda, since it contains very few packages (Python and few more), when you afterwards install a new package, it is fully updated with all its dependancies. In particular

conda install spyder

installs Spyder and all its dependancies at the very last available version.

On the opposite side, the base environment of Anaconda already contains plenty of packages and conda does it best to install the most updated version which is still compatible with the existing packages, but very often it is not the last one. Now, it appears that Spyder uses QT to show the graphical interface and one of its dependancies qtconsole=5.2.2 has some bug which causes the problem. When installing Spyder from the base environment, conda installs qtconsole=5.1.1 and the problem does not appear while, if installing from a fresh new environment, qtconsole=5.2.2 is installed and the problem shows up. Therefore, is is sufficient to downgrade qtconsole

conda install qtconsole=5.1.1

to fix the problem.

Rent Charter Buses Company
READ ALSO
Plot the multiple values returned by a function

Plot the multiple values returned by a function

My function returns 2 different values which I want to utilise in 2 different graphs using MatplotlibHow can I achieve it?

111
How to Measure Similarity or Difference of Meaning Between Words? [closed]

How to Measure Similarity or Difference of Meaning Between Words? [closed]

Want to improve this question? Update the question so it's on-topic for Stack Overflow

96
Is there anyway to shorten the amount of lines used for having multiple turtles?

Is there anyway to shorten the amount of lines used for having multiple turtles?

So I'm trying to make a program where I want to have many turtlesBut I was wondering if instead of writing every single name to instate a new turtle being made, I could make it as short as one line if it's possible on Python turtle

109
I can't run Hydrogen. No kernel for grammar Python Found?

I can't run Hydrogen. No kernel for grammar Python Found?

Disclaimer: I am sure this has been answered, and I Googled but none of them seem to work unless I missed something

100