0

I ran into the below when trying to import pandas from modin on mac os

import modin.pandas as pd. what is the possible fix for this?

error traceback

ImportError                               Traceback (most recent call last)
<ipython-input-44-7e7b44bd7fd7> in <module>
----> 1 import modin.pandas as pd

~/opt/anaconda3/lib/python3.8/site-packages/modin/pandas/__init__.py in <module>
     26     )
     27 
---> 28 from pandas import (
     29     eval,
     30     cut,

ImportError: cannot import name 'Flags' from 'pandas' (/Users/mac/opt/anaconda3/lib/python3.8/site-packages/pandas/__init__.py)
chuky pedro
  • 756
  • 1
  • 8
  • 26

1 Answers1

0

Probably, pandas version that you use is old enough. Flags appeared in pandas since 1.2.1 version. In order to get the latest versions of Modin and pandas, you can do the following:

pip uninstall modin # this removes Modin and its dependencies
pip install modin # this installs Modin 0.9.1 with pandas 1.2.3
Yaroslav
  • 61
  • 2