error on Spyder update to 5.1.5 version

Quellocinese (2700 points)
2 4 22
asked Oct 22, 2021 in Programming in Python by Quellocinese (2,700 points)

By opening spyder it shows that a new version is avaible for update:

spyder update message

when I try to run the scripts in the anaconda prompt, it literaly runs for hours...I don't think it's caused by slow cpu power issue since this is a R5 5500, I don't think it should take more than 4 hours, the time it took to get me to stop it manually

this is the prompt it shows after an hour or so, i've tried to update it 2 or 3 times and nothing changes:

prompt

4 Answers

Best answer
andrea.sterbini (172780 points)
514 935 1789
answered Oct 22, 2021 by andrea.sterbini (172,780 points)
selected Oct 22, 2021 by Quellocinese
notice that spyder-line-profiler and spyder-unittest are not yet compatible with Spyder 5. Perhaps it's better to stick to version 4
Luigi Pizza (6120 points)
11 20 65
commented Oct 22, 2021 by Luigi Pizza (6,120 points)
Will we use spyder 4 in the exam?
andrea.sterbini (172780 points)
514 935 1789
commented Oct 22, 2021 by andrea.sterbini (172,780 points)
it does not matter, we do not impose timeout on exam exercises
Luigi Pizza (6120 points)
11 20 65
answered Oct 22, 2021 by Luigi Pizza (6,120 points)
edited Oct 22, 2021 by Luigi Pizza
I had the same problem, so don't worry. It may seem troublesome because uninstalling and reinstalling Spyder doesn't work and neither does uninstalling and reinstalling Anaconda altogether (at least it didn't work for me). I've spoken with prof. Mancini of this same issue and he suggested to delete anaconda's and spyder's files from the pc. To do this go on C:/Users/name_of_your_user/ and uninstall all files Anaconda related: .conda (and literally any other folder). Then, make the secret directories be visible, from name_of_your_user go on appdata and uninstall the folder called Spyder. After this reinstall Anaconda. Anaconda's environment has been fixed. Reinstall the libraries.

Now you can try installing Spyder 5, based on a response on stackoverflow:

The problem is with the Anaconda channel.

I uninstalled Spyder and then install with the line:

conda install spyder

and Spyder 5.0.0 was successfully installed.

Anaconda's Spyder page (https://anaconda.org/anaconda/spyder) gave the command as:

conda install -c anaconda spyder

which led to the installation of Spyder 4.0.1, instead of 5.0.0 which was what it was supposed to install as documented on the page itself.

Instead of cancelling everything as I suggested above, you can try (but I can't tell you for sure because I never used these):

conda update anaconda

and then

conda install spyder=5

Let me know if any of these work
Quellocinese (2700 points)
2 4 22
commented Oct 22, 2021 by Quellocinese (2,700 points)
thank you so much for the explanation! I'll personally stick to Sterbini's advice because of the compatibility of spyder-line-profiler and spyder-unit-test but if someone else wants to update to version 5 this comment will be so useful for them!
gianluca5539 (9820 points)
3 6 44
answered Oct 22, 2021 by gianluca5539 (9,820 points)

Try the following commands in an Anaconda Admin Prompt:

conda update anaconda

conda install --force-reinstall pyqt qt

spyder --reset

* reboot the system preferably *

conda update spyder=5.1.5

James_F (4750 points)
7 14 37
answered Oct 22, 2021 by James_F (4,750 points)
The solution is as simple as, open anaconda-navigator (cause a GUI will be more comfortable in this case). Uninstall spyder, then install the specific version you want, in this case, the last one.
It worked for me both on linux and windows, where i was struggling af with the conda repo