How Do You Check if snappy Is Installed?

Problem scenario
You are not sure if snappy (the Python development tool) is installed.  You try these two commands:

>>> import snappy

You see this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 50, in <module>
    from snappy_cffi import UncompressError, compress, decompress, \
  File "", line 3, in <module>
    from cffi import FFI
ImportError: No module named cffi

The above means snappy is not installed or if you recently installed it, the environment variables are not updated.  

Potential root cause
You installed it but the environment variables have not been updated and refreshed. 

Log off as the current user and log back in.

Then use option 1 if you have pip installed:

pip list | grep -i snappy

Then use option 2 if you do not have pip installed:

Run these two commands:

>>> import snappy #where ">>>" is not something that you type in

# If you see no errors in the above, then snappy has been installed

Leave a comment

Your email address will not be published. Required fields are marked *