list-lambdas icon indicating copy to clipboard operation
list-lambdas copied to clipboard

Requirements installation fails

Open weyderfs opened this issue 2 years ago • 2 comments

When run pip install -r requirements.txt fails:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
launchpadlib 1.10.13 requires testresources, which is not installed.
awscli 1.25.37 requires botocore==1.27.37, but you have botocore 1.8.50 which is incompatible.
awscli 1.25.37 requires docutils<0.17,>=0.10, but you have docutils 0.19 which is incompatible.
awscli 1.25.37 requires s3transfer<0.7.0,>=0.6.0, but you have s3transfer 0.1.13 which is incompatible.
aws-list-all 0.8.0 requires boto3>=1.15.1, but you have boto3 1.5.14 which is incompatible.

My setup:

➜ aws --version && python3 --version && lsb_release -a
aws-cli/1.25.37 Python/3.8.10 Linux/5.15.0-41-generic botocore/1.27.37
Python 3.8.10
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

weyderfs avatar Jul 26 '22 18:07 weyderfs

mm weird, it works for me. Can you try and change the requirements.txt file to:

boto3
terminaltables
progressbar2

Maybe by removing the versions it will help?

ranrib avatar Jul 27 '22 06:07 ranrib

mm weird, it works for me. Can you try and change the requirements.txt file to:

boto3
terminaltables
progressbar2

Maybe by removing the versions it will help?

So, after remove hardcode versions the requirements.txt works:

➜ pip install -r requirements.txt 
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: boto3 in /home/weyderfs/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (1.24.37)
Requirement already satisfied: terminaltables in /home/weyderfs/.local/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (3.1.0)
Requirement already satisfied: progressbar2 in /home/weyderfs/.local/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (3.34.3)
Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /home/weyderfs/.local/lib/python3.8/site-packages (from boto3->-r requirements.txt (line 1)) (0.6.0)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /home/weyderfs/.local/lib/python3.8/site-packages (from boto3->-r requirements.txt (line 1)) (1.0.1)
Requirement already satisfied: botocore<1.28.0,>=1.27.37 in /home/weyderfs/.local/lib/python3.8/site-packages (from boto3->-r requirements.txt (line 1)) (1.27.37)
Requirement already satisfied: python-utils>=2.1.0 in /home/weyderfs/.local/lib/python3.8/site-packages (from progressbar2->-r requirements.txt (line 3)) (3.3.3)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /home/weyderfs/.local/lib/python3.8/site-packages (from botocore<1.28.0,>=1.27.37->boto3->-r requirements.txt (line 1)) (1.26.11)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/weyderfs/.local/lib/python3.8/site-packages (from botocore<1.28.0,>=1.27.37->boto3->-r requirements.txt (line 1)) (2.8.2)
Requirement already satisfied: six>=1.5 in /home/weyderfs/.local/lib/python3.8/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.28.0,>=1.27.37->boto3->-r requirements.txt (line 1)) (1.16.0)

Otherwise after run python list_lambdas.py:

➜ python list_lambdas.py 
Traceback (most recent call last):
  File "list_lambdas.py", line 9, in <module>
    import boto3
ImportError: No module named boto3

I've tried too directly using python3 list_lambdas.py and the erros changes:

➜ python3 list_lambdas.py
N/A% (0 of 22) |                                                                                                                                                            | Elapsed Time: 0:00:00 ETA:  --:--:--Traceback (most recent call last):
  File "list_lambdas.py", line 300, in <module>
    print_lambda_list(arguments)
  File "list_lambdas.py", line 166, in print_lambda_list
    response = lambda_client.list_functions()
  File "/home/weyderfs/.local/lib/python3.8/site-packages/botocore/client.py", line 508, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/weyderfs/.local/lib/python3.8/site-packages/botocore/client.py", line 915, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the ListFunctions operation: The security token included in the request is invalid

But is I use aws lambda list-functions works fine.

weyderfs avatar Jul 27 '22 15:07 weyderfs