# ModuleNotFoundError: No module named 'weaviate.classes'; 'weaviate' is not a package

**URL:** <https://forum.weaviate.io/t/modulenotfounderror-no-module-named-weaviate-classes-weaviate-is-not-a-package/9477>\
**Category:** General\
**Created:** [December 27, 2024, 4:02pm UTC](https://forum.weaviate.io/t/modulenotfounderror-no-module-named-weaviate-classes-weaviate-is-not-a-package/9477 "2024-12-27T16:02:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kien\_Chau](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kien_chau/32/3261_2.png) [@Kien\_Chau](https://forum.weaviate.io/u/Kien_Chau)\
**Post date:** [December 27, 2024, 4:02pm UTC](https://forum.weaviate.io/t/modulenotfounderror-no-module-named-weaviate-classes-weaviate-is-not-a-package/9477/1 "2024-12-27T16:02:51Z")

</div>

I am having a problem when importing weaviate.  
Steps i have done:

1. pip install weaviate-client (ver 4.10.2)
2. Create Weaviate Cloud Cluter  
 ![1](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/e/ed958d6f08e87d98f194e7f6db1b7df3b5490a34.png)
3. Run below code

```auto
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?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [December 27, 2024, 4:10pm UTC](https://forum.weaviate.io/t/modulenotfounderror-no-module-named-weaviate-classes-weaviate-is-not-a-package/9477/2 "2024-12-27T16:10:54Z")

</div>

hi @Kien_Chau !!

Welcome to our community 🤗

considering this error message, it seems that the weaviate package is not installed.

Are you sure the weaviate-client is installed at the same environment you are running this script?

---

<div class="post-metadata">

**Author:** ![Kien\_Chau](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kien_chau/32/3261_2.png) [@Kien\_Chau](https://forum.weaviate.io/u/Kien_Chau)\
**Post date:** [December 28, 2024, 6:01am UTC](https://forum.weaviate.io/t/modulenotfounderror-no-module-named-weaviate-classes-weaviate-is-not-a-package/9477/3 "2024-12-28T06:01:35Z")

</div>

hi @DudaNogueira,

Thank you for your reply.  
I created conda env named myenv, and install weaviate-client using pip, then execute the code, and get below error.  
I have tried to create new env, but the same error.  
I also downgraded weaviate-client, but nothing changed.  
And also restart my computer.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [December 29, 2024, 2:00pm UTC](https://forum.weaviate.io/t/modulenotfounderror-no-module-named-weaviate-classes-weaviate-is-not-a-package/9477/4 "2024-12-29T14:00:13Z")

</div>

hi! can you check if the pip command you are using is the same one from the env you created?

You can usually check this with:

```bash
which pip

```

Thanks!
