serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

Cryptography not appearing even though it's in requirements.txt?

Open vineetparikh opened this issue 3 years ago • 3 comments

For context, while my requirements.txt file (for a Flask application deployed in a Lambda function) has cryptography, I'm still getting the error

NotImplementedError: Algorithm 'RS256' could not be found. Do you have cryptography installed? 

and as a result I can't use PyJWT, which is necessary for a higher-level dependency. This is despite the fact that I have cryptography installed and present in my requirements.txt file. What's going on here?

vineetparikh avatar Sep 20 '22 00:09 vineetparikh

Hey any updates?

vineetparikh avatar Sep 24 '22 17:09 vineetparikh

Hey @vineetparikh - are you able to post a small reproducible example? Maybe the solution to your problem is somewhere here: https://github.com/jpadilla/pyjwt/issues/181? It's possible that the problem is not related to the plugin at all

pgrzesik avatar Sep 24 '22 21:09 pgrzesik

Just browsing through issues and perhaps I can shed some light to anyone stumbling upon this. Not sure if it applies to your specific issue, though. I've run into this issue with cryptography / cffi in the past when deploying from windows/mac. The following configuration helps:

custom:
  pythonRequirements:
    dockerizePip: non-linux

xaviergmail avatar Dec 06 '22 23:12 xaviergmail