ImportError: the feather-format library is not installed

(Ganesh Bhat) #1

Hi,

I have installed the feather-format library and restarted Jupyter Notebook as well as my laptop and the below error does not go away at all. I am running Jupyter on Windows 10 and have installed fastai 0.7 version.

Can anyone help?

ModuleNotFoundError Traceback (most recent call last)
D:\Anaconda3\envs\fastai\lib\site-packages\pandas\io\feather_format.py in _try_import()
13 try:
—> 14 import feather
15 except ImportError:

D:\Anaconda3\envs\fastai\lib\site-packages\feather_init_.py in
16
—> 17 from feather.api import (read_dataframe, write_dataframe,
18 FeatherError, FeatherReader, FeatherWriter)

D:\Anaconda3\envs\fastai\lib\site-packages\feather\api.py in
14
—> 15 from pyarrow.feather import (read_feather as read_dataframe, # noqa
16 write_feather as write_dataframe,

D:\Anaconda3\envs\fastai\lib\site-packages\pyarrow_init_.py in
31
—> 32 from pyarrow.lib import cpu_count, set_cpu_count
33 from pyarrow.lib import (null, bool_,

ModuleNotFoundError: No module named ‘pyarrow.lib’

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)
in
1 os.makedirs(‘tmp’, exist_ok=True)
----> 2 df_raw.to_feather(‘tmp/bulldozers-raw’)

D:\Anaconda3\envs\fastai\lib\site-packages\pandas\core\frame.py in to_feather(self, fname)
1890 “”"
1891 from pandas.io.feather_format import to_feather
-> 1892 to_feather(self, fname)
1893
1894 def to_parquet(self, fname, engine=‘auto’, compression=‘snappy’,

D:\Anaconda3\envs\fastai\lib\site-packages\pandas\io\feather_format.py in to_feather(df, path)
49 raise ValueError(“feather only support IO with DataFrames”)
50
—> 51 feather = _try_import()
52 valid_types = {‘string’, ‘unicode’}
53

D:\Anaconda3\envs\fastai\lib\site-packages\pandas\io\feather_format.py in _try_import()
16
17 # give a nice error message
—> 18 raise ImportError(“the feather-format library is not installed\n”
19 “you can install via conda\n”
20 “conda install feather-format -c conda-forge\n”

ImportError: the feather-format library is not installed
you can install via conda
conda install feather-format -c conda-forge
or via pip
pip install -U feather-format

Regards
Ganesh Bhat

0 Likes

(Alberto) #2

Maybe you could try to install pyarrow it seems the latest version is not compatible so you could try with the following:

conda install -c conda-forge pyarrow=0.10.0

0 Likes

(Ganesh Bhat) #3

Thanks for the response.

Tried your suggestion but still have the issue.

Regards
Ganesh Bhat

0 Likes

(Ganesh Bhat) #4

When I try

df_raw = pd.read_feather(‘tmp/bulldozers-raw’)

I get the below error. Please note the initial error has still not gone yet.

AttributeError Traceback (most recent call last)
in
----> 1 df_raw = pd.read_feather(‘tmp/bulldozers-raw’)

D:\Anaconda3\envs\fastai\lib\site-packages\pandas\io\feather_format.py in read_feather(path, nthreads)
104 “”"
105
–> 106 feather = _try_import()
107 path = _stringify_path(path)
108

D:\Anaconda3\envs\fastai\lib\site-packages\pandas\io\feather_format.py in _try_import()
12
13 try:
—> 14 import feather
15 except ImportError:
16

D:\Anaconda3\envs\fastai\lib\site-packages\feather_init_.py in
15 # flake8: noqa
16
—> 17 from feather.api import (read_dataframe, write_dataframe,
18 FeatherError, FeatherReader, FeatherWriter)
19 from feather.version import version as version

D:\Anaconda3\envs\fastai\lib\site-packages\feather\api.py in
13 # limitations under the License.
14
—> 15 from pyarrow.feather import (read_feather as read_dataframe, # noqa
16 write_feather as write_dataframe,
17 FeatherError,

D:\Anaconda3\envs\fastai\lib\site-packages\pyarrow_init_.py in
48
49
—> 50 import pyarrow.compat as compat
51
52

AttributeError: module ‘pyarrow’ has no attribute ‘compat’

Regards
Ganesh Bhat

0 Likes

(swati gupta) #5

Hi Ganesh,

I am facing the same issue. Were you able to resolve this issue?

Regards,
Swati

0 Likes

(Ganesh Bhat) #6

Hi Swati,

Not yet.

Regards
Ganesh Bhat

0 Likes

(Ganesh Bhat) #7

I have raised the bug as a JIRA ticket at https://issues.apache.org/jira/browse/ARROW-4561.

Hopefully, someone helps there.

Regards
Ganesh Bhat

0 Likes

(swati gupta) #8

Thanks for doing the needful. Ganesh!

0 Likes

(Ganesh Bhat) #9

Got the issue resolved. Removed the fastai environment and updated the fastai folder using git pull and then installed the fastai environment.

Please ensure that you use pip to install anything on this environment.

Regards
Ganesh Bhat

0 Likes