You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Unable to import module 'service': No module named pkg_resources #132
to
pkgStr = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze', '--all'])
As we are doing pip freeze pkg_resources doesn't add to required packages lsit , Some modules required pkg_resources eg : anyconfig library (pip install anyconfig)
lambda is getting errored out showing "Unable to import module 'service': No module named pkg_resources"
I have fixed this by adding --all argument to freeze
Activity
shivanetha commentedon Oct 12, 2018
In file https://github.com/nficano/python-lambda/blob/master/aws_lambda/aws_lambda.py
line number : 439 i have modified
from
pkgStr = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
to
pkgStr = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze', '--all'])
As we are doing pip freeze pkg_resources doesn't add to required packages lsit , Some modules required pkg_resources eg : anyconfig library (pip install anyconfig)
lambda is getting errored out showing "Unable to import module 'service': No module named pkg_resources"
I have fixed this by adding --all argument to freeze
Update aws_lambda.py