aws-samples / appsync-bedrock-sample-with-ai-agent

MIT No Attribution
31 stars 8 forks source link

Dependency conflicts #48

Open uhinze opened 4 months ago

uhinze commented 4 months ago

CDK deployment fails with the following error:

...
#7 11.32 INFO: pip is looking at multiple versions of langchain to determine which version is compatible with other requirements. This could take a while.
#7 11.47 ERROR: Cannot install -r requirements.txt (line 38) and langsmith==0.0.14 because these package versions have conflicting dependencies.
#7 11.47
#7 11.47 The conflict is caused by:
#7 11.47     The user requested langsmith==0.0.14
#7 11.47     langchain 0.1.11 depends on langsmith<0.2.0 and >=0.1.17
#7 11.47
#7 11.47 To fix this you could try to:
#7 11.47 1. loosen the range of package versions you've specified
#7 11.47 2. remove package versions to allow pip attempt to solve the dependency conflict
#7 11.47
#7 11.47 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
...
jsmey commented 3 months ago

Using the latest langchain, langsmith and langchainplus-sdk in requirements.txt fixed this error for me.

langchain
langchainplus-sdk
langsmith
josegilramirez commented 3 months ago

As @jsmey says, you have to look for this elements:

langchain==0.1.11
langchainplus-sdk==0.0.17
langsmith==0.0.14

in the requirements.txt files under "handler-claude-agent", "handler-claude-simple" and "handler-claude-websocket" directories and replace them with:

langchain
langchainplus-sdk
langsmith

so the pip install process can deal with package dependencies by installing latest versions.