AttributeError: module 'pinecone' has no attribute 'init'

try to install many time with new envirment but steal facing error of AttributeError: module ‘pinecone’ has no attribute ‘init’
pip3 install pinecone-client

import pinecone
pinecone.init(
api_key=os.getenv(“PINECONE_API_KEY”),
environment=os.getenv(“PINECONE_ENV”), a
)

1 Like

Pinecone released a new version yesterday pinecone-client · PyPI

pinecone.init is now legacy initialization and the init step has been removed. Guidance is available in the Pinecone Python SDK v3.0.0 Migration Guide

New methods:

import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ.get('XXX'))
2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.