Request: Provide libsnappy with the SWAN images

Hi,

In my SWAN jupyter notebook I want to work with data that was compressed with Google’s libsnappy. There is a python package for working with snappy-data called pysnappy, however, this package requires the system to have libsnappy installed. Could you install libsnappy on the SWAN images?
The motivation for libsnappy over zlib are faster compression and decompression times (while worsening the compression ratio a bit). libsnappy is also available at /acc/local/L867/3rdparty/google/snappy/ for the usage on FEC’s, so it might also be or become relevant for other users.

Also, is it OK to install python packages inside a notebook via
%pip install mypackage
as opposed to opening a terminal and running
pip install --user mypackage
as you suggest in the SWAN docs?

Greetings,
Emanuel

Hello @emthalle

Welcome to the SWAN community!

I think this should be installed in the software stack LCG, not in the user image.

please let’s open a ticket here https://sft.its.cern.ch/jira/projects/SPI/ you can also request to them install pysnappy.
let me know the ticket id, to do a follow-up.

For the second point I think it should be the same, but remember that there is an extra step
https://swan.docs.cern.ch/advanced/install_packages/
You should export PYTHONPATH in your environment, and may this require reloading your notebook.
Thinking it well I think is better in the terminal.

Cheers
Omar.

1 Like

Hi Omar,

thank you!

My problem is resolved, while pysnappy requires the system to have libsnappy.so, python-snappy does not, it ships with the library. It is also the more popular of the two. So I will just use python-snappy instead.

Many thanks for the clarifications! Now I know what to do if I actually require something to be installed on the system. :slight_smile:

Greetings,
Emanuel

1 Like