问题
Everytime I start Spyder (with Anaconda) I get a massage saying that my version is outdated and I should update it, so I followed the instructions Spyder's own website gave me, which is running the following commands:
conda update qt pyqt
conda update spyder
But Spyder tells me that syntax is invalid. What should I do?
回答1:
(Spyder maintainer here) Those commands are not meant to be run inside Spyder consoles, but in a system terminal (cmd.exe
on Windows, xterm
on Linux or Terminal.app
on macOS). And please don't forget to close Spyder before doing that.
I updated the text in our Releases page to make that crystal clear.
回答2:
From Anaconda home locate the gear in Spyder's frame and press "Update application".
回答3:
You need to run those commands on a console with administrative rights, in windows, or with a sudo
before them on linux.
I tend to run these three lines in order every time I need to update:
conda update conda -y
conda update --all -y
conda update qt pyqt spyder -y
In Windows I put those three lines in the end of a .bat file (just create a new .txt and then change it's format), right after the code to make sure it has administrative rights.
Updating qt, pyqt and spyder last means sometimes one of those three will rollback an update made to one or more of their dependencies, but in doing so it ensures that in the end spyder will run.
来源:https://stackoverflow.com/questions/48548373/how-to-update-spyder