Error with instant when importing fastparquet in python

I installed the following modules on my EC2 server on which python (3.6) and anaconda are already installed:

  • instant
  • pyarrow
  • s3fs
  • fastparquet

except fastparquet everything else works on import. When I try to import fastparquet, it causes the following error:

[ username@ip8 ~]$ conda -V conda 4.2.13 [ username@ip- ~]$ python Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. import fastparquet Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/username/anaconda3/lib/python3.6/site-packages/fastparquet/__init__.py", line 15, in <module> from .core import read_thrift File "/home/username/anaconda3/lib/python3.6/site-packages/fastparquet/core.py", line 11, in <module> from .compression import decompress_data File "/home/username/anaconda3/lib/python3.6/site-packages/fastparquet/compression.py", line 43, in <module> compressions['SNAPPY'] = snappy.compress AttributeError: module 'snappy' has no attribute 'compress' 

How can I fix this?

+2
source share
1 answer

Unfortunately, there are a few things in python-land called snappy. I believe that you may have the wrong one, in which case one of the following conda commands should solve this for you:

 conda install python-snappy 

or

 conda install python-snappy -c conda-forge 

where the latter is a bit later (releases GIL, which may be important in threaded applications).

+2
source

Source: https://habr.com/ru/post/1269797/


All Articles