Spyder Debugger Crashes - anaconda

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.

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.

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.

Related

Anaconda Spyder 4.1.5 updates

I have the most recent Anaconda navigator on both my Windows and Linux machines, but when i open Spyder on either machine it tells me that Spyder 4.1.5 is available and i should install it. I can't do this through navigator.
The Anaconda page says to run 'conda install -c anaconda spyder' to install Spyder 4.1.5. link: Anaconda.org page On my linux machine this just tries to install Spyder 4.1.4 (Ubuntu screeenshot), I get the same result with windows (windows screenshot)
It seems this is a regular issue, what is the point of relesaing a piece of software and then not allowing it to be downlaoded and installed in the very manner that both Anaconda and Spyder tell you to do it?
Since you seem to have a previous version installed, did you try a simple update from the conda prompt?
conda update spyder --dry-run
Just remove the --dry-run part if everything looks fine.

Anaconda 3 Spyder Version 4.0.1 corrupted, cant install v4.1.3 completely

On my MacBook Pro, I used Anaconda Spyder 4.0.1 successfully for 6 weeks. But this week it started producing extraneous plots and printouts, even after removing all variables, Restarting the kernel and restarting Spyder. It was so bad I couldn’t find my real outputs.
This happened despite the fact that my python 3 script finished execution. With no error exceptions
I first tried upgrading Spyder, since it said version 4.1.3 was available and suggested i should try it I did this successfully in terminal with CondA install Spyder 4.1.3. But this did not update the version available from Anaconda navigator.
So I clean unininstalled Anaconda 3 and reinstalled from new download, but got Spyder 4.0.1 again, with the very same results
This loop does not converge, so I am dead in the water.
I could not update Spyder from version 4.0.1 either (although I tried via the Anaconda GUI, not via terminal).
When I tried 'conda update --all' via terminal it worked. I did get a message that anaconda itself needed to be downgraded.

How to upgrade Spyder in Anaconda? [duplicate]

This question already has answers here:
Trouble updating to Spyder 4.0.0
(8 answers)
Closed 2 years ago.
I just installed new Anaconda with Python 3.7. The Spyder version is still 3.36 and it says there is an new version 4.0.1 available each time I started Spyder.
I tried to upgrade Spyder using two approach:
conda update spyder (it didn't work even there was no error)
conda install spyder=4.0.1
Using second method, found so many conflict like below.
Open "Anaconda Navigator" and in Spyder Frame you'll see a gear icon, click on that and then click on "Update Application".
I had the same problem, using the Spyder icon little wheel of Anaconda home. It was running forever and, if lucky stopped without updating.
To solve the issue, I opened the "Anaconda prompt" (as admin, just in case), launched the command:
conda update --all
The back to Anaconda home, little wheel of Spyder icon and chose the highest version. The install tool a few dozen of secs.

Error on Anaconda 5.3 while installing RStudio , saying offline mode

I downloaded Anaconda 5.3 and am trying to Install RStudio in it. I get the below error always after upgrading.
"Some of the functionality of Anaconda Navigator will be limited in offline mode."
"Installation and upgrade of packages will be subject to the packages currently available on your package cache."
Even if the internet is connected, I get the same error which didnt happen with previous version. Does anyone know how to overcome this? Please advise.
Btw, RCran and RStudio are not approved software and hence I am trying to use the one through Anaconda IDE.
Same as you here, there is an issue related https://github.com/ContinuumIO/anaconda-issues/issues/10176.
While anaconda-navigator having this problem, you can still install packages through anaconda prompt.
open anaconda prompt in your start menu
type conda install rstudio

mayavi hangs under enthought canopy

I have been using Mayavi under enthought Canopy successfully for past 8 months. During a recent update using egg, I got a message about a missing egg in the Canopy package manager and found Mayavi Hanging. I tried to revet to older Mayavi (4.0.0) but no luck. It only works if I revert to Mayavi 3.4 version.
Can somebody suggest me possible sources of error. I am using Windows 8 64bit. Running Mayavi2.exe, Mayavi-script2.py and importing mayavi - none of these work under Mayavi version 4.0.0 onwards. ( On a 32 bit machine, however, I have no problems)
I suggest that you reset your Canopy User Python environment to start clean:
In the Canopy GUI, print sys.prefix to see where that environment's directory is, then quit Canopy and delete that directory (e.g. in Windows Explorer). Restart Canopy, and your environment will be auto-recreated from the installation-time eggs. (For that reason, you might want to first take the time to uninstall your Canopy, and install the current Canopy 1.5.1 from https://store.enthought.com/downloads/ but that's secondary) -- in-app auto-updates are currently disabled, and will be for at least a few more weeks.
Then open a Canopy Command Prompt (from the Start Menu or from the Canopy Tools menu) and type
enpkg mayavi to update to the current mayavi.
If you are non-academic free user, you'll need to wait a few days before this will work, as Mayavi is not currently accessible to such users using enpkg. Sorry for that inconvenience.
After uninstalling and re-installing Mayavi a couple of times, I continued to have the same problem that Mayavi used to hang.
I have managed to solve it by deleting a file
C:\Users\SUK000???\AppData\Roaming\Enthought\mayavi_e3\pyface\workbench\wx\windows_memento
It seems that Mayavi creates this file by default if it does not exist. If it exists, it tries to use the settings in this file to open Mayavi interface and hangs if it does not like the settings.
That was a relief. Thanks for your ideas.

Resources