Error: Cannot import name 'Pinecone' from 'pinecone'
Fix the Python ImportError 'cannot import name Pinecone from pinecone' by upgrading the Pinecone Python SDK to 3.0.0 or later, with or without gRPC.
Problem
Section titled “Problem”When using an older version of the Python SDK (earlier than 3.0.0), trying to import the Pinecone class raises the following error:
ImportError: cannot import name 'Pinecone' from 'pinecone'Solution
Section titled “Solution”Upgrade the SDK version and try again:
# If you're interacting with Pinecone via HTTP requests, use:
pip install pinecone --upgrade# If you're interacting with Pinecone via gRPC, use:
pip install "pinecone[grpc]" --upgrade