0

I'm trying to use module pyzstd on Lambda service, but I get the following error:

pyzstd module: Neither C implementation nor CFFI implementation can be imported. If pyzstd module is dynamically linked to zstd library, make sure not to remove zstd library, and the run-time zstd library's version can't be lower than that at compile-time.

I've installed this library locally on Macbook M1 using command pip install pyzstd. Then I zipped site-packages from venv and uploaded it along side with handler code.

Jérôme Radix
  • 10,285
  • 4
  • 34
  • 40
datahack
  • 477
  • 1
  • 11
  • 32
  • If I read this correctly, according to the [build docs](https://pyzstd.readthedocs.io/en/latest/#build-pyzstd), pyzstd module requires zstd v1.4.0+. Check what's available on Amazon Linux 2 kernel 4.14, which is the current OS for Lambda. – jarmod Mar 16 '23 at 14:57
  • Pyzstd already includes zstd v1.5.4 source code – datahack Mar 16 '23 at 15:35

1 Answers1

2

The .so binary file was compiled for M1 & macOS. If you run it on other architecture/OS, it will fail to import.

Ma Lin
  • 36
  • 3