Spyder 5不会在Windows 10上启动

2024-09-29 23:26:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚将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).

我如何解决这个问题


Tags: toinpysizelibpackagessiteusers
1条回答
网友
1楼 · 发布于 2024-09-29 23:26:44

Spyder maintainer here)该错误消息是由Spyder中的错误引起的,将在我们即将发布的下一个版本(5.0.1)中修复

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

spyder reset

相关问题 更多 >

    热门问题