Try to view a pandas dataframe variable in the Variable Explorer, but an error message showed up as "Spyder was unable to retrive the variable from console: error message is: "ModuleNotFoundError("No module named 'pandas.core.internals.managers'; 'pandas.core.internals' is not a package")
Operating system: Mac Mojave (10.14.3)
Python 3.7
Spyder 3
I've searched the github and found the copy to clipboard solution, which didn't work.
IPython >=4.0 : 7.2.0 (OK)
cython >=0.21 : 0.29.2 (OK)
jedi >=0.9.0 : 0.13.2 (OK)
matplotlib >=2.0.0: 3.0.2 (OK)
nbconvert >=4.0 : 5.4.0 (OK)
numpy >=1.7 : 1.15.4 (OK)
pandas >=0.13.1 : 0.23.4 (OK)
psutil >=0.3 : 5.4.8 (OK)
pycodestyle >=2.3 : 2.4.0 (OK)
pyflakes >=0.6.0 : 2.0.0 (OK)
pygments >=2.0 : 2.3.1 (OK)
pylint >=0.25 : 2.2.2 (OK)
qtconsole >=4.2.0 : 4.4.3 (OK)
rope >=0.9.4 : 0.11.0 (OK)
sphinx >=0.6.6 : 1.8.2 (OK)
sympy >=0.7.3 : 1.3 (OK)
It is not possible to visualize everything through the variable explorer. When that's the case, we show messages like the one you reported as there's nothing else we can do about it, sorry.
Hi @ccordoba12 ,
I'm having the same error message and it only appeared after I updated pandas from 0.23 to 0.24 version.
The error occurs when I try to visualize a pandas DataFrame in the variable explorer. As I said, it was working without any problem until I updated pandas to 0.24.
Any idea how to solve this?
Thanks a lot in advance
I am having this same issue with pandas 0.24.2 while accessing DataFrame variables from Variable explorer in Spyder 3.3.3
I downgraded pandas to 0.23.4 and it started to work again. I would suggest this issue be reopened.
I'm getting the same problem as reported above.
issue with 0.25.3
I had this problem as i was using spyder-kernels to link one, minimal Spyder env with a seperate dev env, as described on the Spyder wiki here.
Unfortunately that Spyder env cannot be quite as minimal as i hoped because the Variable Explorer understandably requires packages (eg Pandas) to be in that env, as described on StackOverflow here.
Does this solve anyone else's issue here? @gwsampso @ifly6 @avinash175 @DanielFPerez @ccordoba12 @CAM-Gerlach
Unfortunately that Spyder env cannot be quite as minimal as i hoped because the Variable Explorer understandably requires packages (eg Pandas) to be in that env, as described on StackOverflow here.
Yeah, Pandas needs to be installed in both your env with spyder-kernels and the one that has Spyder. The first requirement is needed to be able to create dataframes from your code. The second one to visualize them in Spyder.
Thanks for confirming @ccordoba12 . Much appreciated. Love Spyder.
Two possible solutions jump out as maybe getting a lot of benefit for relatively little cost:
A, Could Spyder's error message be expanded from "No module named pandas" to "No module in Spyder's env named pandas"?
B, Make a note in the spyder-kernels wiki page.
Option A seems more appropriate in the long run, but as B is such low hanging fruit, i have made a first wiki attempt here . Needs specifying by someone who knows better though. @CAM-Gerlach
A, Could Spyder's error message be expanded from "No module named pandas" to "No module in Spyder's env named pandas"?
Thanks for the suggestion. @juanis2112 is working on this right now (we came to the same conclusion due to a similar issue reported three or four weeks ago).
B, Make a note in the spyder-kernels wiki page.
Thanks for your help!
@JonB451 Hey, so option A
is actually already in work as #12563 , feel free to give your feedback on the wording of the PR when it is ready to be reviewed. As for 'B', thanks so much for your help! I've expanded accordingly, but that was a very important point to raise and a great start. Happy Spydering!
Most helpful comment
I am having this same issue with pandas 0.24.2 while accessing DataFrame variables from Variable explorer in Spyder 3.3.3
I downgraded pandas to 0.23.4 and it started to work again. I would suggest this issue be reopened.