# HELP first time using pinecone, am dealing with strange import error

**URL:** <https://community.pinecone.io/t/help-first-time-using-pinecone-am-dealing-with-strange-import-error/6429>\
**Category:** Support\
**Tags:** vector-database, import-export\
**Created:** [August 22, 2024, 3:17pm UTC](https://community.pinecone.io/t/help-first-time-using-pinecone-am-dealing-with-strange-import-error/6429 "2024-08-22T15:17:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nahotamultiverse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/nahotamultiverse/32/3091_2.png) [@nahotamultiverse](https://community.pinecone.io/u/nahotamultiverse)\
**Post date:** [August 22, 2024, 3:17pm UTC](https://community.pinecone.io/t/help-first-time-using-pinecone-am-dealing-with-strange-import-error/6429/1 "2024-08-22T15:17:44Z")

</div>

I’ve tried updating pinecone client, I’ve made sure i have downloaded pinecone, but for some reason it isn’t working…

MY ERROR:

python3 setup\_rag.py  
Traceback (most recent call last):  
File “setup\_rag.py”, line 3, in   
from pinecone import Pinecone, ServerlessSpec  
ImportError: cannot import name ‘Pinecone’ from ‘pinecone’ (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pinecone/ **init**.py)

MY CODE:  
from dotenv import load\_dotenv  
load\_dotenv()  
from pinecone.grpc import PineconeGRPC as Pinecone  
from pinecone import ServerlessSpec  
from openai import OpenAI  
import os  
import json

# Initialize Pinecone

pc = Pinecone(api\_key=os.getenv(“PINECONE\_API\_KEY”))

# Create a Pinecone index

pc.create\_index(  
name=“rag”,  
dimension=1536,  
metric=“cosine”,  
spec=ServerlessSpec(cloud=“aws”, region=“us-east-1”),  
)

# Load the review data

data = json.load(open(“reviews.json”))

processed\_data =   
client = OpenAI()

# Create embeddings for each review

for review in data[“reviews”]:  
response = client.embeddings.create(  
input=review[‘review’], model=“text-embedding-3-small”  
)  
embedding = response.data[0].embedding  
processed\_data.append(  
{  
“values”: embedding,  
“id”: review[“professor”],  
“metadata”:{  
“review”: review[“review”],  
“subject”: review[“subject”],  
“stars”: review[“stars”],  
}  
}  
)

# Insert the embeddings into the Pinecone index

index = pc.Index(“rag”)  
upsert\_response = index.upsert(  
vectors=processed\_data,  
namespace=“ns1”,  
)  
print(f"Upserted count: {upsert\_response[‘upserted\_count’]}")

# Print index statistics

print(index.describe\_index\_stats())

---

<div class="post-metadata">

**Author:** ![ZacharyProser](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zacharyproser/32/1146_2.png) [@ZacharyProser](https://community.pinecone.io/u/ZacharyProser)\
**Post date:** [August 26, 2024, 2:34pm UTC](https://community.pinecone.io/t/help-first-time-using-pinecone-am-dealing-with-strange-import-error/6429/2 "2024-08-26T14:34:45Z")

</div>

Hi @nahotamultiverse, and welcome to the Pinecone community forums!

Thanks for your question.

Could you please confirm which version of the Pinecone client you have installed?

Best,  
Zack

---

<div class="post-metadata">

**Author:** ![sudeepto.learn2025](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/sudeepto.learn2025/32/3959_2.png) [@sudeepto.learn2025](https://community.pinecone.io/u/sudeepto.learn2025)\
**Post date:** [May 28, 2025, 10:09pm UTC](https://community.pinecone.io/t/help-first-time-using-pinecone-am-dealing-with-strange-import-error/6429/3 "2025-05-28T22:09:11Z")

</div>

Did we have a solution for this issue. Kindly let me the solution

---

<div class="post-metadata">

**Author:** ![milen](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/milen/32/3914_2.png) [@milen](https://community.pinecone.io/u/milen)\
**Post date:** [May 29, 2025, 6:21pm UTC](https://community.pinecone.io/t/help-first-time-using-pinecone-am-dealing-with-strange-import-error/6429/4 "2025-05-29T18:21:21Z")

</div>

Hello @sudeepto.learn2025 and welcome to the Pinecone community.

It’s unclear what is causing the issue for the original poster (note that there is no answer to the follow-up question), and thus it’s not possible to know what the solution is.

It’s generally not a good practice to resurrect old posts. It’s better to create a new one where you describe your issue. Link to similar posts to indicate you’ve done your research but haven’t found a solution. Remember that providing context and details about the environment (versions, libraries used, etc.) significantly improves your chances of getting a helpful answer faster.
