aws-samples / amazon-bedrock-workshop

This is a workshop designed for Amazon Bedrock a foundational model service.
https://catalog.us-east-1.prod.workshops.aws/workshops/a4bdb007-5600-4368-81c5-ff5b4154f518/en-US/20-intro
MIT No Attribution
1.38k stars 591 forks source link

Could not import anthropic python package. This is needed in order to accurately tokenize the text for anthropic models. Please install it with `pip install anthropic`. #171

Closed Jayasundar closed 5 months ago

Jayasundar commented 7 months ago

ModuleNotFoundError Traceback (most recent call last) File /opt/conda/lib/python3.10/site-packages/langchain_community/utilities/anthropic.py:6, in _get_anthropic_client() 5 try: ----> 6 import anthropic 7 except ImportError:

ModuleNotFoundError: No module named 'anthropic'

During handling of the above exception, another exception occurred:

deki commented 7 months ago

I'm also seeing this error while running 02_contextual_generation.ipynb

deki commented 7 months ago

There is already a fix provided in #173

rsgrewal-aws commented 7 months ago

Could you please specify the path to the notebook? The set up notebook has anthropic==0.9.0 in the set up requirements

deki commented 7 months ago

Yes it's now part of it as #173 has been merged. So this issue can be closed as well.

w601sxs commented 5 months ago

Closing this; please refer to the latest bedrock workshop update and reopen if still relevant