Spyder无法从Anaconda启动,重置设置与重装后问题仍未解决
Hey there, let's get your Spyder up and running again. Looking at your error traceback, the root cause is a corrupted autosave cache file—the ast.literal_eval function is throwing an unexpected EOF error because the autosave metadata file is incomplete (likely from an unexpected Spyder crash the last time you used it).
Here's how to fix it step by step:
Step 1: Find the Spyder autosave directory
On your Windows 10 machine, navigate to this path (replace<my account name>with your actual Windows username):C:\Users\<my account name>\.spyder-py3\autosaveStep 2: Clear the corrupted autosave files
- First, make sure Anaconda and Spyder are completely closed (check Task Manager to kill any background processes if needed).
- Open the
autosavefolder you located. You'll see files ending with.autosaveand possibly.pidfiles. - Delete all files in this folder—this only removes unsaved recovery data, so your already saved Python scripts are totally safe. If you want to try salvaging any unsaved work, you can open the
.autosavefiles with a text editor first to copy out content before deleting.
Step 3: Launch Spyder again
Go back to Anaconda Navigator and start Spyder. It should boot normally now, since it won't try to parse the broken autosave metadata anymore.
If the problem still persists:
Try resetting Spyder's settings once more (since you already tried this before, but doing it after clearing the autosave folder might help):
- Open Anaconda Navigator
- Go to the "Home" tab
- Locate Spyder, click the gear icon next to it
- Select "Reset"
- After the reset finishes, launch Spyder again
This solution is tailored to your setup: Windows 10, Anaconda 2020.02, Spyder 4.0.1.
内容的提问来源于stack exchange,提问作者aso

