When trying to import the hugging face package "datasets" I get an attribute error from PyArrow

57 Views Asked by At

I have tried to start environments with several different python versions and installed pyarrow in different versions. Nothing worked where can it be coming from?

AttributeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets

File ~/anaconda3/envs/hugging_face/lib/python3.11/site-packages/datasets/init.py:34 28 if _version.parse(pyarrow.version).major < 1: 29 raise ImportWarning( 30 "To use datasets, the module pyarrow>=1.0.0 is required, and the current version of pyarrow doesn't match this condition.\n" 31 "If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of pyarrow." 32 ) ---> 34 from .arrow_dataset import Dataset, concatenate_datasets 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter

File ~/anaconda3/envs/hugging_face/lib/python3.11/site-packages/datasets/arrow_dataset.py:45 42 from datasets.tasks.text_classification import TextClassification 44 from . import config, utils ---> 45 from .arrow_reader import ArrowReader 46 from .arrow_writer import ArrowWriter, OptimizedTypedSequence 47 from .features import ClassLabel, Features, Value

File ~/anaconda3/envs/hugging_face/lib/python3.11/site-packages/datasets/arrow_reader.py:33 30 from datasets.utils.file_utils import DownloadConfig 32 from .naming import _split_re, filename_for_dataset_split ... ---> 61 wrapper.wrapped = wrapped 62 # Return the wrapper so this can be used as a decorator via partial() 63 return wrapper

AttributeError: readonly attribute

I have tried environments with python 3.9.6, 3.10, 3.11.4, 3.11.8 but nothing is working. I have restarted several times and installed different versions of pyarrow.

0

There are 0 best solutions below