Problem
If you are using Pinecone serverless and getting the error"AttributeError: module 'pinecone' has no attribute 'init', first check that you are using the latest version of the Python SDK.
You can check the version of the client by running:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🎉 New: Standard and Enterprise orgs get a one-time $250 bulk import credit (1 TB), valid through August 30, 2026. See details
Fix the Python AttributeError ‘module pinecone has no attribute init’ by upgrading to Pinecone Python SDK 3.0 or later, which serverless indexes require.
"AttributeError: module 'pinecone' has no attribute 'init', first check that you are using the latest version of the Python SDK.
You can check the version of the client by running:
pip show pinecone
# If you're interacting with Pinecone via HTTP:
pip install pinecone --upgrade
# If you're using gRPC:
# pip install "pinecone[grpc]" --upgrade
import pinecone
pinecone.init(api_key=api_key,environment=environment)
from pinecone import Pinecone
pc = Pinecone(api_key=api_key)
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key=api_key)
Was this page helpful?