-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable explorer not working due to incompatibility between Numpy 2 and 1 #22842
Comments
PS: I can get the Spyder variable explorer to work when pinning the versions of numpy, pandas, scipy, and matplotlib in the conda env to the exact same versions as the Spyder dependencies. But these versions are fairly old, and cause dependency conflicts if I'm trying to include any additional packages in my conda env. |
Hey @ingo-m, this is basically a duplicate of issue #22784, so I'm going to close it in favor of that one. You also found the cause of this problem:
This means your distro packages depend on Numpy 1 but you had Numpy 2 installed in your conda env. Since the two versions don't produce compatible objects, it's not possible to use the Variable Explorer to visualize arrays or dataframes with it. |
Sorry, this was actually not a duplicate of #22784, but now you know the cause and why what you did worked. We'll try to provide a better error message for this in a later release. |
Ok thanks. If there's nothing more that can be done about it at the moment I don't mind if you close the issue, I just thought it makes sense to document the issue here for others & future reference. The root cause of my problem is that I can't get spyder to work in a conda env on Ubuntu 24 (which uses wayland). Installing spyder as a deb package is only a workaround, which in turn causes the problem with the variable explorer. |
Well, you can also install Xorg with |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
For years, I always installed spyder directly into conda envs, no problem. However, since I switched to Ubuntu 24 (with wayland) that does not work anymore (see #22219).
So instead, I installed the spyder deb package (currently spyder 5.5.1):
I also installed numpy & pandas in the system python env (not sure whether this was necessary):
But now I cannot inspect objects (such as numpy arrays and pandas dataframes) from the variable explorer anymore ("Spyder was unable to retrieve the value of this variable from the console.").
More specifically, I can inspect numpy arrays and dataframes from the variable explorer when using spyder's default python interpreter (presumably system python), but not when using a conda env.
Now that's not ideal, because obviously for interactive python development I need to use my project's conda env with all relevant packages, not system python.
I'm aware of #22784 and that there might be a mismatch between system python and the conda env, but the question is how to solve this?
Is there any way to get the variable explorer to work after installing spyder as a deb package (which, again, is the only way to get spyder to work under Ubuntu 24 & wayland AFAIK)?
Versions
This is from the "About Spyder" menu (referring to system python):
Ubuntu 24.04.1 LTS
My conda env is using python 3.12.7
Conda env packages (spyder python interpreter is configured to use this env)
Dependencies
Spyder dependencies
The text was updated successfully, but these errors were encountered: