Python Forum
Amazon AWS - how to install the library chatterbot
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amazon AWS - how to install the library chatterbot
Hi All,

Thanks in advance for the help!

So, I´m trying to install the library chatterbot on Amazon AWS but is too heavy and I was not able to do it.

I tried to zip and upload the layers but did not accept and I also tried, upload on S3 and use on lambda layers, but return the message: size of 262144000 bytes.
After you have intstalled Anaconda use this command to install :
pip install chatterbot
Hi satyashetty ,

In my computer, I installed with success and I already create my code for the chatbot, what I´m trying is use my code in AWS Lambda where I´m not able to install the library.

Did you use AWS Lambda?

Thank you very much!
you can use git to clone,, then install it.
but, it depends on SpaCy for it's nlp which you should install it first.
also SpaCy requires some language models which should be installed.
Hi brighteningeyes

I´m in the first steps...

Would you mind explain how can I do itin Lambda Aws?
"you can use git to clone,, then install it "

Thank you
do the following:
git clone ./chatterbot
cd ./chatterbot
pip install -r requirements.txt
python -m spacy download en
python install
this should install it along with spaCy's language model.
Hi brighteningeyes, once againg, thank you very much for your help.

I installed okay, and upload to AWS Lambda, but see below the message from AWS.

START RequestId: 7531991b-8d49-4547-ae66-c94ba254b6c2 Version: $LATEST
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'chatterbot'
END RequestId: 7531991b-8d49-4547-ae66-c94ba254b6c2
REPORT RequestId: 7531991b-8d49-4547-ae66-c94ba254b6c2 Duration: 1.71 ms Billed Duration: 100 ms Memory Size: 3008 MB Max Memory Used: 59 MB Init Duration: 129.21 ms

Look the complete message

Resultado da execução: com falha(logs)
A área abaixo mostra o resultado retornado após a execução da função. Saiba mais sobre os resultados retornados por sua função.
"errorMessage": "Unable to import module 'lambda_function'"
Código SHA-256
ID da solicitação
0.33 ms
Período cobrado
100 ms
Recursos configurados
128 MB
Memória máxima usada
51 MB Init Duration: 1.57 ms
Resultado de saída do log
A seção abaixo mostra as chamadas de registro em log no seu código. Elas são representadas por uma única linha no grupo de logs do CloudWatch que correspondem a esta função do Lambda. Clique aqui para visualizar o grupo de log do CloudWatch.
START RequestId: 526923f6-6791-44ed-a2f4-1ac1ea455ae8 Version: $LATEST
Unable to import module 'lambda_function': No module named 'chatterbot'

END RequestId: 526923f6-6791-44ed-a2f4-1ac1ea455ae8
REPORT RequestId: 526923f6-6791-44ed-a2f4-1ac1ea455ae8 Duration: 0.33 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 51 MB Init Duration: 1.57 ms
hi again,
so, you need to put the package in s3, then upload it into lambda
this might seem useful.
Hi brighteningeye,

Yes, I did it, as for an example I did the process with the requests library and it works and with the chatterbot, I got the message:

"errorMessage": "Unable to import module 'lambda_function'"

START RequestId: d2ab6a92-a2d4-459a-9715-4384f9648d69 Version: $LATEST
Unable to import module 'lambda_function': No module named 'chatterbot'

END RequestId: d2ab6a92-a2d4-459a-9715-4384f9648d69
REPORT RequestId: d2ab6a92-a2d4-459a-9715-4384f9648d69 Duration: 0.42 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 61 MB
so, you can copy chatterbot's files directly, instead of setting it up with
this might work then.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't open Amazon page Pavel_47 3 283 Oct-21-2020, 09:13 AM
Last Post: Aspire2Inspire
  New in Python Amazon Scraping brian1425 1 413 Jul-10-2020, 01:00 PM
Last Post: snippsat
  Execute search query on Amazon website Pavel_47 7 750 Nov-07-2019, 10:43 AM
Last Post: snippsat
  How to add multiple lines response in chatterbot? PrateekG 13 3,630 May-18-2018, 07:36 AM
Last Post: buran
  Install a library manually metulburr 12 12,365 Nov-06-2016, 11:25 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020