python-3.x Spyder 5不会在Windows 10上启动

polkgigr  于 2023-02-26  发布在  Python
关注(0)|答案(2)|浏览(238)

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

我该如何解决这个问题?

xqnpmsa8

xqnpmsa81#

Spyder maintainer here)该错误消息是由Spyder中的一个bug引起的,它将在我们即将发布的下一个版本(5.0.1)中得到修复。
目前唯一的解决方法是打开Anaconda Prompt(或系统终端,如Windows上的cmd.exe、macOS上的Terminal或Linux上的xterm)并在那里运行:
spyder --reset

nsc4cvqm

nsc4cvqm2#

1.卸载。
1.删除所有缓存和残留文件的spyder,看看在appdata文件夹。
1.重新安装。
Spyder是一个令人惊叹和敏捷的IDE,但有时是一个痛苦的屁股。

相关问题