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
#1
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.
Reply
#2
After you have intstalled Anaconda use this command to install :
pip install chatterbot
Reply
#3
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!
Reply
#4
hi,
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.
Reply
#5
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
Reply
#6
hi,
do the following:
git clone https://github.com/gunthercox/chatterbot.git ./chatterbot
cd ./chatterbot
pip install -r requirements.txt
python -m spacy download en
python setup.py install
this should install it along with spaCy's language model.
Reply
#7
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)
Detalhes
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'"
}
Resumo
Código SHA-256
4fqvLEZDLTe3ljfrf8TREQL7HKfXF4tvJZycwotXA5M=
ID da solicitação
526923f6-6791-44ed-a2f4-1ac1ea455ae8
Duraçã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
Reply
#8
hi again,
so, you need to put the package in s3, then upload it into lambda
this might seem useful.
Reply
#9
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
Reply
#10
hi,
so, you can copy chatterbot's files directly, instead of setting it up with setup.py.
this might work then.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Requests_HTML not getting all data on Amazon aaander 1 1,287 Nov-19-2022, 02:09 AM
Last Post: aaander
  Getting a URL from Amazon using requests-html, or beautifulsoup aaander 1 1,620 Nov-06-2022, 10:59 PM
Last Post: snippsat
  Can't open Amazon page Pavel_47 3 3,124 Oct-21-2020, 09:13 AM
Last Post: Aspire2Inspire
  New in Python Amazon Scraping brian1425 1 1,975 Jul-10-2020, 01:00 PM
Last Post: snippsat
  Execute search query on Amazon website Pavel_47 7 3,397 Nov-07-2019, 10:43 AM
Last Post: snippsat
  How to add multiple lines response in chatterbot? PrateekG 13 8,382 May-18-2018, 07:36 AM
Last Post: buran
  Install a library manually metulburr 12 19,343 Nov-06-2016, 11:25 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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