Python lib psycopg2 fails to import

Hi!

Trying to import a psycopg2 lib at the Python code step and it’s fails. May I ask for a help with that problem?

Hi @nktamanakov

Thanks for sharing the error message, it’s very helpful!

It looks like we might have a specific permissions issue with installing that library. Have you tried using the new magic comment importing system with this package? It might help bypass this permissions problem:

Hope this helps!

@pierce thanks for youe reply!

I’ve tried to add magic comment:

# pipedream add-package psycopg2-binary
import psycopg2

But step fails with the same error.

What can I try to do next? :slight_smile:

@nktamanakov sorry, looks like you’ve found a package that is built for an amd64 environment, and workflow steps run in an ARM environment.

Here’s another package that claims to support the Lambda architecture:

You can use the magic comment system to import it, but unfortunately due to the low level bindings of this package we may not be able to support it without a 3rd party building a Lambda version.