Spider says that it crashed the last time it was used, and asks me to --reset to solve the error I'm getting. I've tried --reset, uninstalling and reinstalling, updating, and I still cannot initialize spyder from the mac terminal command line as I usually do. It's an installation from within conda.
What steps will reproduce the problem?
I'm not sure what caused this problem to happen. Whenever I try to
I encounter this problem.
What is the expected output? What do you see instead?
Expect to open the spyder GUI, instead get a pop up window with an error message the first time I try, saying:
Spyder crashed during last session.
If Spyder does not start at all and before submitting a bug report, please try to reset settings to defaults by running Spyder with the command line option '--reset':
python spyder --resetWarning: this command will remove all your Spyder configuration files located in '$HOME/.spyder').
If restoring the default settings does not help, please take the time to search for known bugs or discussions matching your situation before eventually creating a new issue here. Your feedback will always be greatly appreciated.
and then I reset it, and get only error messages in the mac terminal console the next times I try.
from spyder.interpreter import Interpreter
File "$HOME/anaconda/lib/python2.7/site-packages/spyder/interpreter.py", line 19, in
from code import InteractiveConsole
ImportError: cannot import name InteractiveConsole
from code import InteractiveConsole
ImportError: cannot import name InteractiveConsole
My guess is that you somewhere have file called a code.py
and that this file interferes with the code
module in Python's standard library which is used by Spyder. If this is the case, then you may find the file by running import code
and print(code)
from a Python console.
That is fantastic. I had indeed pulled from a repository in which someone added a file named code.py. I got rid of the repository altogether, and now Spyder is back. Thank you so much.
Most helpful comment
My guess is that you somewhere have file called a
code.py
and that this file interferes with thecode
module in Python's standard library which is used by Spyder. If this is the case, then you may find the file by runningimport code
andprint(code)
from a Python console.