API calling issue/error

Hello,

I am using Pinecone for the first time for learning purposes.
I have successfully installed pinecone using pip. ($pip3 install pinecone-client)

When I run pip3 list, it shows pinecone-client installed.

However, getting error when calling the API.

import pinecone

print(“Hello”)

pinecone.init(api_key=“My_Key”, environment=“gcp-starter”)

Error:

python3 pinecone.py
Hello
Traceback (most recent call last):
File “/…/pinecone.py”, line 1, in
import pinecone
File “/…/pinecone.py”, line 5, in
pinecone.init(api_key=“My_Key”, environment=“gcp-starter”)
AttributeError: partially initialized module ‘pinecone’ has no attribute ‘init’ (most likely due to a circular import)

Any help would be highly appreciated.

Thank you

Resolved: This error come because I named my file is pinecone.py. rename my file and this error gone. It is working now.

Thank you community!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.