【问题标题】:Spyder 5 Won't Launch on Windows 10Spyder 5 无法在 Windows 10 上启动
【发布时间】:2021-07-07 18:58:36
【问题描述】:

我刚刚将我的 Python 环境迁移到一台新的笔记本电脑上,但无法启动 Spider 5。我使用的是 Python 3.7,并尝试通过 Anaconda Navigator 和命令提示符启动。这是我得到的错误:

(DS7331) C:\Users\BNayd>spyder
C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\utils\image_path_manager.py:46: UserWarning: The icon located in C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\images\dark\kite.svg is overriding the existing kite
  f'The icon located in {complete_path} is overriding '
No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect.
QWindowsWindow::setGeometry: Unable to set geometry 5x13+640+280 on QWidgetWindow/'QLabelClassWindow'. Resulting geometry:  120x13+640+280 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum size: 16777215x16777215).
QWindowsWindow::setGeometry: Unable to set geometry 5x13+640+280 on QWidgetWindow/'QLabelClassWindow'. Resulting geometry:  120x13+640+280 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum size: 16777215x16777215).
QWindowsWindow::setGeometry: Unable to set geometry 5x13+640+280 on QWidgetWindow/'QLabelClassWindow'. Resulting geometry:  120x13+640+280 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum size: 16777215x16777215).
QWindowsWindow::setGeometry: Unable to set geometry 5x13+640+280 on QWidgetWindow/'QLabelClassWindow'. Resulting geometry:  120x13+640+280 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum size: 16777215x16777215).
Traceback (most recent call last):
  File "C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1058, in <lambda>
    lambda c=client: self.process_started(c))
  File "C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1733, in process_started
    self.main.variableexplorer.add_shellwidget(client.shellwidget)
  File "C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\plugins\variableexplorer\plugin.py", line 113, in add_shellwidget
    self.get_widget().add_shellwidget(shelwidget)
  File "C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\plugins\variableexplorer\widgets\main_widget.py", line 537, in add_shellwidget
    self._set_actions_and_menus(nsb)
  File "C:\Users\BNayd\anaconda3\envs\DS7331\lib\site-packages\spyder\plugins\variableexplorer\widgets\main_widget.py", line 710, in _set_actions_and_menus
    editor.insert_action_above = QAction()
TypeError: arguments did not match any overloaded call:
  QAction(QObject): not enough arguments
  QAction(str, QObject): not enough arguments
  QAction(QIcon, str, QObject): not enough arguments
QWindowsWindow::setGeometry: Unable to set geometry 1260x1840+18+41 on QWidgetWindow/'MainWindowClassWindow'. Resulting geometry:  1260x1061+18+41 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 485x314, maximum size: 16777215x16777215).

我该如何解决这个问题?

【问题讨论】:

    标签: python python-3.x anaconda spyder


    【解决方案1】:

    此处是 Spyder 维护者)该错误消息是由 Spyder 中的错误引起的,它将在我们即将发布的下一个版本 (5.0.1) 中修复。

    目前唯一的解决方法是打开 Anaconda Prompt(或系统终端,如 Windows 上的 cmd.exe、macOS 上的 Terminal 或 Linux 上的 xterm)并在那里运行:

    spyder --reset

    【讨论】:

    • 我降级到 Spyder 4.2.5,它仍然做同样的事情。我得到了初始启动窗口,但随后它崩溃了。
    • 嗨,我也有同样的问题。当我使用 Spyder Icon 启动时,它显示“正在初始化”并且没有做任何进一步的事情。当我从 Anaconda 提示符中使用“spyder”启动时,它可以工作。当我使用导航器启动时,它可以工作。有什么建议吗?
    猜你喜欢
    • 2019-08-14
    • 2019-08-02
    • 1970-01-01
    • 2017-03-04
    • 2021-07-05
    • 2017-08-22
    • 1970-01-01
    • 2017-07-16
    • 2017-07-21
    相关资源
    最近更新 更多