KeyError('pandas._libs.interval') when opening a dataframe in Spyder

旧时模样 提交于 2021-02-11 12:46:11

问题


When I try to click on data frames in the Variable Explorer in Spyder, I get the following error:

This happens with all data frames (I tried making my own).

As a side note, functions like numpy.sum and .describe() don't output anything, but I'm unsure if this is related to the KeyError.

Thank you!


回答1:


Add pandas to the packages option in setup.py module.

Here is the code snippet for setup.py

from setuptools import setup

APP = ['automating_finances0.py']
DATA_FILES = []
OPTIONS = {'packages': ['pandas']} 

setup(
  app=APP,
  data_files=DATA_FILES,
  options={'py2app': OPTIONS},
  setup_requires=['py2app'],
)

If this not works please try reinstalling pandas from pip as

pip uninstall pandas

pip install pandas



来源:https://stackoverflow.com/questions/66022547/keyerrorpandas-libs-interval-when-opening-a-dataframe-in-spyder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!