AttributeError: module 'snappy' has no attribute 'compress'
See original GitHub issuemacos, brew install of python3. then, after pandas,
# pip3 install snappy
snappy in /usr/local/lib/python3.7/site-packages (2.7)
...
# pip3 install fastparquet
Requirement already satisfied: fastparquet in /usr/local/lib/python3.7/site-packages (0.3.2)
...
the simple program
#!/usr/bin/env python3
from fastparquet import write
import csv
import pandas as pd
x= pd.read_csv( "test.csv" ) ## parq always writes to file, never to stdout
print( "reading was ok" )
parq.write_dataframe( x, "./test.parq" )
print( "writing was ok" )
yields an error
File "/usr/local/lib/python3.7/site-packages/fastparquet/compression.py", line 45, in <module>
compressions['SNAPPY'] = snappy.compress
AttributeError: module 'snappy' has no attribute 'compress'
snappy was installed fine, partly via brew install snappy
.
hope this helps.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
module 'snappy' has no attribute 'decompress' - Stack Overflow
I believe you've installed SnapPy a package for geometry. You should install pip install python-snappy instead of pip install snappy .
Read more >Re: AttributeError: module 'snappy' has no attribute 'compress'
Almost all cosmology/astrophysics/astronomy codes which is my primary interest are not working due to the error: AttributeError: module 'snappy' has no ...
Read more >AttributeError: module 'snappy' has no attribute 'ProductIO'
Hello there. As I mentioned in the title, when I try to use the ProductIO option on the jupyter notebook, I get this...
Read more >[sage-cell] Re: AttributeError: module 'snappy' has no attribute ...
Hi Andrey and the Team, Probably the long-standing problem "AttributeError: module 'snappy' has no attribute 'compress'" can now be solved.
Read more >Python – module 'snappy' has no attribute 'decompress'
Python – module 'snappy' has no attribute 'decompress' ... But in both time when i'm trying to run python code where i import...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
pip3 install python-snappy
(notpip3 install snappy
)If you have installed the
snappy
library try:and then reinstall:
it worked for me.