我的Mac上的Spyder最近停止工作,并在启动后立即将错误消息发送给终端

时间:2018-12-27 04:31:22

标签: macos spyder

我在Mac上运行High Sierra。我有python版本2.7、3.6和3.7。每个版本都有conda环境。我经常使用Spyder 3.3.2,真的很喜欢它。但是最近它停止工作了。最好的是,我记得当我尝试升级到Spyder 4.0时开始出现的问题。我删除了Anaconda并重新加载它无济于事。我已经在Python 2.7和3.6上尝试过,但得到了相同的错误消息。

我尝试过的方法:卸载并安装spyder。我已经重新加载pyqt,并且没有错误加载。我删除并重新安装了Anaconda。

谁能告诉我我需要做什么?错误消息如下所示。

[py36] $ spyder

Traceback (most recent call last):
  File "/Users/johnny/anaconda3/envs/py36/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/johnny/anaconda3/envs/py36/bin/spyder", line 11, in <module>
    sys.exit(main())
  File "/Users/johnny/anaconda3/envs/py36/lib/python3.6/site-packages/spyder/app/start.py", line 186, in main
    from spyder.app import mainwindow
  File "/Users/johnny/anaconda3/envs/py36/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 90, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/Users/johnny/anaconda3/envs/py36/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
[johnny:~] [py36] 2s 1 $

1 个答案:

答案 0 :(得分:1)

我找到了解决方案,我想是更多解决方法。我完全删除了anaconda3目录,并返回到Anaconda主页并重新安装了anaconda3。现在Spyder运行正常。