aws-samples/amazon-bedrock-workshop

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`.

Jayasundar opened this issue · 5 comments

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

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

deki commented

There is already a fix provided in #173

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

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

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