I am having a problem when importing weaviate.
Steps i have done:
- pip install weaviate-client (ver 4.10.2)
- Create Weaviate Cloud Cluter
- Run below code
import weaviate
from weaviate.classes.init import Auth
# Best practice: store your credentials in environment variables
weaviate_url = os.environ["WEAVIATE_URL"]
weaviate_api_key = os.environ["WEAVIATE_API_KEY"]
# Connect to Weaviate Cloud
client = weaviate.connect_to_weaviate_cloud(
cluster_url=weaviate_url,
auth_credentials=Auth.api_key(weaviate_api_key),
)
print(client.is_ready())
I got below error when executing the code:
Traceback (most recent call last):
File “C:\Users\KienCT6\Desktop\Study\Multimodal_LLM\weaviate.py”, line 1, in
import weaviate
File “C:\Users\KienCT6\Desktop\Study\Multimodal_LLM\weaviate.py”, line 3, in
from weaviate.classes.init import Auth
ModuleNotFoundError: No module named ‘weaviate.classes’; ‘weaviate’ is not a package
I have already install weaviate package, so i don’t know why it shows this error. Does anyone know how to fix this?