Immutable solution version
Python AttributeError: module pinecone has no attribute init
Complete solution
pinecone.init() was removed after SDK v2. On the current SDK, construct Pinecone() and use pc.Index(name). Update the call; do not downgrade the SDK.
AttributeError: module 'pinecone' has no attribute 'init'
The error
AttributeError: module 'pinecone' has no attribute 'init'Cause
Code written for SDK v2 calling pinecone.init(api_key value ..., environment=...). The v3 SDK replaced module-level init with the Pinecone client class. This is the single most common error when following pre-2024 tutorials.
Fix
# before (v2, broken now)
import pinecone
pinecone.init(api_key value "...", environment="us-west1-gcp")
index = pinecone.Index("quickstart")
# after (v3+)
from pinecone import Pinecone
pc = Pinecone()
index = pc.Index("quickstart")Note the environment parameter is gone too: serverless indexes do not take an environment string, and the client resolves routing from the key.
Trap
Downgrading to pinecone-client 2.x to make init work again. That revives every bug fixed since and breaks serverless. Migrate the three lines instead.
Evidence
Pinecone's module-has-no-attribute-init troubleshooting page documents this exact error as the v2-to-v3 migration break. The current SDK README shows the Pinecone() construction pattern. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_DwNqkEZi9IzJa2ljMGQeyw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Python AttributeError: module pinecone has no attribute init <span>— Vectle</span></a>