Spyder 调试器崩溃

发布于 2025-01-10 06:29:15 字数 758 浏览 0 评论 0原文

苹果操作系统 12.2.1 蟒蛇导航器 2.1.2 Spyder 5.1.5

我访问过Spyder 网站,执行了所谓的“基本急救”和“紧急心肺复苏”,但没有得到满意的解决方案。第一个症状是调试器挂起。执行建议的修复(更新 Anaconda、Spyder 和 Spyder 依赖项、系统重新启动等)后,调试器现在报告:“OperationalError:尝试写入只读数据库。”

我已经无计可施了。我想知道是否需要完全重新安装所有 Anaconda。有没有“最好的方法”来做到这一点?我可以参考一个网站来演示如何进行全新安装吗?

附录

所以,我从我的机器上清理了 Anaconda(多么可怕的经历!)并重新安装它,使用 conda 来完成这两项任务。我启动了 Anaconda,然后启动了 Spyder。然后我加载了我的一个模块,在编辑器中设置了一个制动点,然后繁荣! Spyder 调试器工作了。然而,新安装的 Anaconda 缺少一个特定的库:pyreadstat。我使用 conda 来获取这个库。然后我再次启动 Anaconda,看到 pyreadstat 现在位于基础(根)环境中。我运行了我的一个包(8 个模块,主要由 ND 数组的 numpy 和 itertools 操作组成),一切正常,包括调用 pyreadstat 来读取 SAS 数据集。好吧,一切看起来都很和谐。因此,我尝试调试我的一个模块,但调试器再次失败,返回消息:“OperationalError:尝试写入只读数据库。”卧槽! conda 是否以某种神秘的方式破坏了 Spyder 的调试器?我不明白。为什么 pyreadstat 会影响 Spyder.一定是康达。

Mac OS 12.2.1
Anaconda Navigator 2.1.2
Spyder 5.1.5

I’ve been to the Spyder Web site, performed what was described as “Basic First-Aid” as well as “Emergency CPR” without satisfactory resolution. The first symptom was that the debugger just hung. After performing the suggested fixes (updating Anaconda, Spyder, and Spyder dependencies, system re-boot, etc.), the debugger now reports: “OperationalError: attempt to write a readonly database.”

I’m at my wits’ end. I’m wondering if I need to completely re-install all of Anaconda. Is there a “best way” to do this? Is there a web site that I can consult that will demonstrate how to get a fresh installation?

ADDENDUM

So, I cleaned Anaconda from my machine (what a horrific experience!) and re-installed it, using conda for both tasks. I started Anaconda and then launched Spyder. Then I loaded one of my modules, set a brake-point in the editor, and boom! The Spyder debugger worked. However, the new installation of Anaconda was lacking a particular library: pyreadstat. I used conda to get this library. I then launched Anaconda again, saw that pyreadstat was now in the base(root) environment. I ran one of my packages (8 modules mainly consisting of numpy and itertools manipulations of N-D arrays) and everything worked, including calls to pyreadstat to read SAS datasets. Okay, everything seemed copacetic. So, I tried to debug one of my modules and the debugger failed again, returning the message: “OperationalError: attempt to write a readonly database.” WTF! Is conda trashing Spyder’s debugger in some mysterious way? I don’t get it. Why would pyreadstat affect Spyder. It must be conda.

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

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

发布评论

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

评论(2

情魔剑神 2025-01-17 06:29:15

为了回答我自己的问题,我在 Mac 终端应用程序中输入:

--> conda install -c conda-forge spider=5.2.2

繁荣!一切都很好。

To answer my own question, in the Mac Terminal app, I typed:

--> conda install -c conda-forge spyder=5.2.2

Boom! All is well.

断念 2025-01-17 06:29:15

我在使用spyder 5.1.5版本的Windows10上遇到了同样的问题。
对我来说,按照此处的建议将 Spyder 更新到最新版本也有效。这可以通过两种方式完成:

控制台

打开控制台,或者,如果您使用的是 Windows,则打开 Anaconda Prompt 并键入以下命令,以便首先卸载spyder,然后重新安装最新版本(仅更新对我来说不起作用)。

conda remove -n myenv spyder
conda install -n myenv -c conda-forge spyder
  • 第一个命令,remove,卸载spyder virtualenv 称为“myenv”。如果您不使用 virtualenvs,只需将 -n myenv 放在一边即可。
  • 第二个命令 install 从第三个命令安装spyder -party 频道 conda-forge 而不是官方频道 defaults。为了安装比 5.1.5

Anaconda Navigator

  • 更新的间谍版本,此选项是必需的。卸载 Spyder:在“主页”选项卡中,在“应用程序”下拉菜单中选择正确的虚拟环境。然后单击spyder图块右上角的齿轮符号并选择“删除应用程序”。
  • conda-forge 添加到您的环境通道:页面。
  • 再次安装spyder,就像第一次一样。
  • 再次单击spyder图块上的齿轮,选择“安装特定版本”以更新到最新版本。现在,应该可以使用 5.1.5 以上的版本。

I had the same problem on Windows10 with spyder version 5.1.5.
For me, updating Spyder to the newest version as suggested here worked as well. This can be done in two ways:

Console

Open the console or, if you're working on Windows, the Anaconda Prompt and type the following commands in order to first uninstall spyder, and then re-install the newest version (just updating didn't work for me).

conda remove -n myenv spyder
conda install -n myenv -c conda-forge spyder
  • The first command, remove, uninstalls spyder in the virtualenv called 'myenv'. If you don't use virtualenvs, just leave the -n myenv aside.
  • The second command, install installs spyder from the third-party channel conda-forge instead of the official channel defaults. This option is necessary in order to install a spyder version newer than 5.1.5

Anaconda Navigator

  • Uninstall Spyder: In the "Home" tab, select the correct virtual environment in the "Applications on" dropdown menu. Then click on the gear symbol in the upper right corner of the spyder tile and select "remove application".
  • Add conda-forge to your environment's channels: This is nicely described at the bottom of this page.
  • Install spyder again, in the way you did it the first time.
  • Click again on the gear on the spyder tile, choose "install specific version" in order to update to the newest version. Now, versions newer than 5.1.5 should be available.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文