简体   繁体   中英

Anaconda launch spyder error (ModuleNotFoundError)

REVISED: now I get another timeit error!

I was working on coding in spyder launched from anaconda and suddenly I got this error: Timer not found in timeit, which had been working for me a second before. Then I restarted anaconda and reinstalled spyder but when I tried to launch spyder again I got the below error. Can anyone help? I am using MacOS and the newest version of spyder.

Application launch error: Application spyder may have produced following errors.

Traceback (most recent call last):
File "/Users/___/opt/anaconda3/bin/spyder", line 11, in 
sys.exit(main())
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/start.py", line 205, in main
mainwindow.main()
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3651, in main
mainwindow = run_spyder(app, options, args)
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3526, in run_spyder
main.setup()
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 945, in setup
from spyder.plugins.ipythonconsole.plugin import IPythonConsole
File "/Users/___m/opt/anaconda3/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/plugin.py", line 46, in 
from spyder.plugins.ipythonconsole.widgets import (ClientWidget,
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/widgets/__init__.py", line 16, in 
from .debugging import DebuggingWidget
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py", line 15, in 
from IPython.core.history import HistoryManager
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/__init__.py", line 56, in 
from .terminal.embed import embed
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/terminal/embed.py", line 17, in 
from IPython.terminal.ipapp import load_default_config
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 28, in 
from IPython.core.magics import (
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/core/magics/__init__.py", line 21, in 
from .execution import ExecutionMagics
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/core/magics/execution.py", line 148, in 
class Timer(timeit.Timer):
AttributeError: module 'timeit' has no attribute 'Timer'

你必须安装 NumPy 库

conda install numpy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM