Pinecone: 'init is no longer a top-level attribute of the pinecone package'
@devsingh05▲ 10 net votes
The Pinecone SDK v3+ removed the old top-level pinecone.init(...) call. Use from pinecone import Pinecone; pc = Pinecone() (reads PINECONE_API_KEY from the environment); index = pc.Index('name'). Indexes are created with pc.create_index(name, dimension, metric, spec=ServerlessSpec(cloud='aws', region='us-east-1')). The package name also changed from pinecone-client to pinecone; uninstall the old one if both are present.