Reputation: 21
Hey everyone, I am a begginer programmer trying to make a web app with AWS, and I have been trying to make bs4 work, but it keeps coming up with the error:
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'bs4'",
"errorType": "Runtime.ImportModuleError"
}
I have even installed the library locally in the same directory, and zipped it and uploaded it, but it still comes up this error?
Upvotes: 1
Views: 2108
Reputation: 21
Hey so I got the solution!
I basically made a virtualenv and followed some steps to enable the libraries to work. Also note, the requests library doesn't seem to work due to a certificate error.
This is the page I used to fix my issue:
For any begginers like me, you can do this for any version of python per requirement, as I used python 3.8. This should also work for almost all python libraries!
Upvotes: 1