Spyder 无法在 Windows 10 上使用 Anaconda 启动(除了一次)

发布于 2025-01-15 06:48:12 字数 2753 浏览 1 评论 0原文

Spyder 5.1.5 无法使用 Windows 10 从 Anaconda 4.1.2 启动 - 除了一次,安装后直接启动 - 从 Anaconda 提示符中抛出这些错误:

link image0 hasn't been detected!
Traceback (most recent call last):
  File "C:\Users\admin\anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\start.py", line 237, in main
    mainwindow.main(options, args)
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 1992, in main
    mainwindow = create_window(MainWindow, app, splash, options, args)
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\utils.py", line 281, in create_window
    main.setup()
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 884, in setup
    plugin_instance = PLUGIN_REGISTRY.register_plugin(
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\api\plugin_registration\registry.py", line 278, in register_plugin
    instance = self._instantiate_spyder4_plugin(
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\api\plugin_registration\registry.py", line 191, in _instantiate_spyder4_plugin
    plugin_instance.register_plugin()
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 754, in register_plugin
    self._remove_old_stderr_files()
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1956, in _remove_old_stderr_files
    for fname in os.listdir(tmpdir):
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\admin\\AppData\\Local\\Temp\\spyder'
[14044:5688:0318/111357.900:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)

是全新安装 Anaconda 4.1.2 后发生的情况:

  • 以下 Anaconda Navigator 第一次
  • 启动 Spyder 第一次
  • Spyder 显示的启动屏幕初始化和加载,然后关闭
  • Spyder 打开

关闭 Spyder 和 Navigator 后,我再次执行以下步骤:

  • 打开 Navigator
  • 启动 Spyder
  • 命令窗口打开,显示 Active code page: 1252
  • Spyder 的启动屏幕显示初始化和加载,然后与命令窗口一起关闭
  • 应用程序启动错误窗口打开,显示我在上面发布的错误
  • Spyder 无法打开

我尝试以管理员身份运行 Navigator,并且 Spyder 确实 打开,但是活动代码页:1252 命令窗口仍然存在。我担心这只是把问题搁置一旁,并不能解决我的问题。另外,据我了解,Anaconda 不需要以管理员身份运行才能工作。

我已尝试以下方法来解决该问题:

  • 多次重新安装 Anaconda:
    • 通常和作为管理员
    • 将 Anaconda 添加到我的路径 未选中和选中
  • 通过conda update condaconda更新spyder
  • 更新通过https://stackoverflow.com/a/69713849/18502309
  • 更改为早期版本(例如 4.2.5)
  • 将Spyder 整个计算机

有谁知道如何让 Spyder 运行?谢谢!

Spyder 5.1.5 does not launch from Anaconda 4.1.2 using Windows 10 — except once, directly after install — throwing these errors from the Anaconda Prompt:

link image0 hasn't been detected!
Traceback (most recent call last):
  File "C:\Users\admin\anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\start.py", line 237, in main
    mainwindow.main(options, args)
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 1992, in main
    mainwindow = create_window(MainWindow, app, splash, options, args)
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\utils.py", line 281, in create_window
    main.setup()
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 884, in setup
    plugin_instance = PLUGIN_REGISTRY.register_plugin(
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\api\plugin_registration\registry.py", line 278, in register_plugin
    instance = self._instantiate_spyder4_plugin(
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\api\plugin_registration\registry.py", line 191, in _instantiate_spyder4_plugin
    plugin_instance.register_plugin()
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 754, in register_plugin
    self._remove_old_stderr_files()
  File "C:\Users\admin\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1956, in _remove_old_stderr_files
    for fname in os.listdir(tmpdir):
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\admin\\AppData\\Local\\Temp\\spyder'
[14044:5688:0318/111357.900:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)

Here's what happens after freshly installing Anaconda 4.1.2:

  • Open Anaconda Navigator for the first time
  • Launch Spyder for the first time
  • Splash screen for Spyder shows initialization and loading, then closes
  • Spyder opens

After closing Spyder and Navigator, I do the steps again:

  • Open Navigator
  • Launch Spyder
  • Command window opens with Active code page: 1252
  • Splash screen for Spyder shows initialization and loading, then closes along with command window
  • Application launch error window opens, showing the errors I posted above
  • Spyder does not open

I've tried running Navigator as administrator and Spyder does open, but the Active code page: 1252 command window persists. I fear this simply kicks the issue down the road and doesn't resolve my problem. Also, it's my understanding that Anaconda shouldn't need to be run as administrator to work.

I've tried the following to resolve the problem:

  • Reinstalling Anaconda multiple times:
    • Normally and as adminstrator
    • Add Anaconda to my path unchecked and checked
  • Updating via conda update conda and conda update spyder
  • Reinstalling Spyder via https://stackoverflow.com/a/69713849/18502309
  • Changing Spyder to an earlier version (e.g., 4.2.5)
  • Restarting my computer throughout

Does anyone know how I can get Spyder running? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

起风了 2025-01-22 06:48:12

使用以管理员身份运行的安装并选中“Anaconda 添加到路径”选项,我通过双击文件夹 AppData\Local\Spyder(具有管理员徽标)并允许以管理员身份访问来解决此问题。

Using an installation run as administrator and with the option Anaconda added to path checked, I solved this by double-clicking on the folder AppData\Local\Spyder (which had the administrator logo) and allowing access as administrator.

梦开始←不甜 2025-01-22 06:48:12

您已经以管理员身份安装了它,但是当您第二次及此后运行它时,“开始”菜单中的“Anaconda 提示符”并未以管理员身份运行。在尝试运行 Spyder 之前,右键单击它并选择“以管理员身份运行”。

You have installed it as an administrator, but when you're running it the second time and thereafter, the "Anaconda prompt" available from the Start menu is not running as administrator. Right click on it and choose "Run as Administrator" before trying to run Spyder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文