2

Due to Anaconda didn't support free for commercial use. So I downloaded Spyder IDE from Spyder official website. Spyder official web Since Spyder IDE doesn't provide a function for users to download libraries as PIP install. But I still love Spyder's UI and some functions, especially, variable explore, etc... So I installed official python on my PC, taking Spyder IDE as a code editor. <-- It can work by changing the python interpreter in the Spyder preference setting. change Spyder's setting to apply official Python

But I found an error when I try to open a variable (which is dataframe) on variable explorer, others are work well. enter image description here

enter image description here

from pandas import DataFrame

People_List = ['Jon','Mark','Maria','Jill','Jack']

df = DataFrame (People_List,columns=['First_Name'])

print (df)
Ian
  • 21
  • 1
  • 3
  • 2
    What did you find when you searched for this in the internet? – mkrieger1 Nov 30 '20 at 08:20
  • @MrFuppes I need to use 32bit version, due to customer's dll is supported 32bit only. – Ian Nov 30 '20 at 11:07
  • @mkrieger1 I am not sure your idea. But I found Spyder can do this on their webpage. [link](https://www.spyder-ide.org/blog/spyder-variable-explorer/view-object-explorer.png) – Ian Nov 30 '20 at 11:10
  • 1
    did you `pip install` Spyder for this specific Python version? If so, I cannot reproduce your issue. Spyder runs just fine on Python 3.7.9 x32 on Windows 10. Variable explorer also works. – FObersteiner Nov 30 '20 at 12:40
  • @MrFuppes I have installed spyder-kernels by PIP.exe, still keep same. This problem may associate with the Windows 10 version, my PC, one is 1909(work well), another is 20H2(occurs an error). In order to prove the suspicion, I installed windows 10 1909 on a virtual machine, this problem was invisible. – Ian Dec 01 '20 at 03:01
  • Are you sure that your system environment variables related to Python are configured exactly the same on all your systems? And why would you install spyder-kernels separately? btw. I tested on Windows 10 Enterprise 2004, using [pyenv-win](https://github.com/pyenv-win/pyenv-win) to manage my Python installations. – FObersteiner Dec 01 '20 at 08:02

2 Answers2

0

I got the same error and I noticed that I only got it after I created GeoDataFrames from the Geopandas library. Once I restarted Spyder, as long as I don't create a GeoDataFrame, it opens all other DataFrames (from Pandas) just fine.

g9c
  • 7
  • 3
0

I had the same issue and setup (windows 10, trying to install and get geopandas to work, but then couldn't get dataframes to be viewed in spyder). Ultimately, running pip install spyder in the new python that I was trying to use in spyder fixed the problem.

However, I think probably switching to an anaconda-based python interpreter in spyder, and installing geopandas and spyder-kernels through conda, would be a better long-term approach. This also has worked for me (I think I have become confused between pip and conda, e.g. this answer re: geopandas asks for pip https://stackoverflow.com/a/58943939/5233269, but conda can also install geopandas -- and most importantly deal with all the dependencies involved. I think conda is probably better long-run for data work.)

Richard DiSalvo
  • 850
  • 12
  • 16