How to fix module pandas has no attribute int64Index error with pandas 2.0


As many people upgraded their pandas to 2.0 version, they might see the following error, when using with other older version of packages.
For example, during using lightgbm, I got this error when importing lightgbm with pandas 2.0 installed.

Error message:

AttributeError: module 'pandas' has no attribute 'Int64Index'`

The way to fix it including upgrade several packages like the following:

pip install --upgrade pandas
pip install --upgrade lightgbm
pip install --upgrade dask

Hope this will fix your problem as well.


Author: robot learner
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source robot learner !
  TOC