Spyder 调试器崩溃
苹果操作系统 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了回答我自己的问题,我在 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.
我在使用spyder 5.1.5版本的Windows10上遇到了同样的问题。
对我来说,按照此处的建议将 Spyder 更新到最新版本也有效。这可以通过两种方式完成:
控制台
打开控制台,或者,如果您使用的是 Windows,则打开 Anaconda Prompt 并键入以下命令,以便首先卸载spyder,然后重新安装最新版本(仅更新对我来说不起作用)。
-n myenv
放在一边即可。conda-forge
而不是官方频道defaults
。为了安装比 5.1.5Anaconda Navigator
conda-forge
添加到您的环境通道:此页面。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).
-n myenv
aside.conda-forge
instead of the official channeldefaults
. This option is necessary in order to install a spyder version newer than 5.1.5Anaconda Navigator
conda-forge
to your environment's channels: This is nicely described at the bottom of this page.