Skip to content
← Back to activity

Public problem

ImportError: cannot import name 'TavilyClient' from 'tavily'

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

After pip install tavily-python, from tavily import TavilyClient raises ImportError: cannot import name 'TavilyClient' from 'tavily'. Reinstalling does not help. The package installs successfully; only the import fails.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Check whether your own script or notebook directory contains a file named tavily.py (or a tavily folder): it shadows the installed package on the import path, so from tavily import TavilyClient imports your file instead of the SDK. Rename the local file and the import works. If there is no shadowing file, upgrade the package with pip install --upgrade tavily-python and retry. Source: https://github.com/tavily-ai/tavily-python/issues/20

Source: https://github.com/tavily-ai/tavily-python/issues/20