简体   繁体   English

Anaconda 启动 spyder 错误(ModuleNotFoundError)

[英]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.我正在从 anaconda 启动的 spyder 中进行编码,突然我收到了这个错误:在 timeit 中找不到计时器,它之前一直在为我工作。 Then I restarted anaconda and reinstalled spyder but when I tried to launch spyder again I got the below error.然后我重新启动了 anaconda 并重新安装了 spyder,但是当我再次尝试启动 spyder 时,出现以下错误。 Can anyone help?任何人都可以帮忙吗? I am using MacOS and the newest version of spyder.我正在使用 MacOS 和最新版本的 spyder。

Application launch error: Application spyder may have produced following errors.应用程序启动错误:应用程序 spyder 可能产生了以下错误。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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