是的,我也出現了spyder crashed during last session這個問題。以前都好好的,一直用這個spyder練習python的,自從搗鼓安裝了tensorflow以後,就打不開了。python
在網上搜了不少網頁,大部分是讓reset,可是我怎麼reset都不行。session
有一次,發現一我的是本身create了一個.py的文件,應該是重名了,後來他把本身的文件重命名後,就行了。app
我也嘗試了這個命令:spyder --show-consolespa
發現下面的錯誤提示:orm
C:\Users\麥冬>spyder --show-console
Traceback (most recent call last):
File "D:\platform\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3099, in main
mainwindow = run_spyder(app, options, args)
File "D:\platform\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3001, in run_spyder
main.setup()
File "D:\platform\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 916, in setup
from spyder.plugins.variableexplorer import VariableExplorer
File "D:\platform\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer.py", line 18, in <module>
from spyder.widgets.variableexplorer.namespacebrowser import NamespaceBrowser
File "D:\platform\Anaconda3\lib\site-packages\spyder\widgets\variableexplorer\namespacebrowser.py", line 25, in <module>
import ipykernel.pickleutil
File "D:\platform\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "D:\platform\Anaconda3\lib\site-packages\ipykernel\connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
File "D:\platform\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in <module>
from .terminal.embed import embed
File "D:\platform\Anaconda3\lib\site-packages\IPython\terminal\embed.py", line 17, in <module>
from IPython.terminal.ipapp import load_default_config
File "D:\platform\Anaconda3\lib\site-packages\IPython\terminal\ipapp.py", line 28, in <module>
from IPython.core.magics import (
File "D:\platform\Anaconda3\lib\site-packages\IPython\core\magics\__init__.py", line 21, in <module>
from .execution import ExecutionMagics
File "D:\platform\Anaconda3\lib\site-packages\IPython\core\magics\execution.py", line 17, in <module>
import timeit
File "D:\platform\Anaconda3\lib\timeit.py", line 1
,#! /usr/bin/env python3
^
SyntaxError: invalid syntaxip
根據這個提示,我去看了timeit.py這個文件,發現第一行多了一個',' , 應該是我以前看過timeit的幫助文件,無心中點了一個點在第一行。後來去掉這個點以後,就能夠打開spyder了。terminal
因此出現上面這個現象時,網上的解決辦法並不統一,由於你們的緣由不同。能夠看一下這個console文件,也許能解決。get