Raise PineconeConfigurationError: You haven't specified an Api-Key

Hi

I’m Facing the issue with the Langchain-Pinecone during Embeddings

  1. Have manually uninstalled the v2 dependency
  2. Followed the Langchain-pinecone documentation. But still i get the error
Traceback (most recent call last):
  File "/Users/roopeshbharatwajkr/PycharmProjects/chainlit/embedding1.py", line 124, in <module>
    Cert_in_AI_vectorstore = process_data(load_data("/Users/roopeshbharatwajkr/DLI/Data /Cert_in_AI_Final/"), "Cert_in_AI")
  File "/Users/roopeshbharatwajkr/PycharmProjects/chainlit/embedding1.py", line 112, in process_data
    vectorstore = PineconeVectorStore.from_texts(
  File "/Users/roopeshbharatwajkr/anaconda3/envs/Python3_9/lib/python3.9/site-packages/langchain_pinecone/vectorstores.py", line 453, in from_texts
    pinecone_index = cls.get_pinecone_index(index_name, pool_threads)
  File "/Users/roopeshbharatwajkr/anaconda3/envs/Python3_9/lib/python3.9/site-packages/langchain_pinecone/vectorstores.py", line 386, in get_pinecone_index
    client = PineconeClient(
  File "/Users/roopeshbharatwajkr/anaconda3/envs/Python3_9/lib/python3.9/site-packages/pinecone/control/pinecone.py", line 205, in __init__
    self.config = PineconeConfig.build(
  File "/Users/roopeshbharatwajkr/anaconda3/envs/Python3_9/lib/python3.9/site-packages/pinecone/config/pinecone_config.py", line 29, in build
    return ConfigBuilder.build(
  File "/Users/roopeshbharatwajkr/anaconda3/envs/Python3_9/lib/python3.9/site-packages/pinecone/config/config.py", line 58, in build

    raise PineconeConfigurationError("You haven't specified an Api-Key.")
pinecone.exceptions.exceptions.PineconeConfigurationError: You haven't specified an Api-Key.

Process finished with exit code 1

raise PineconeConfigurationError(“You haven’t specified an Api-Key.”)
pinecone.exceptions.exceptions.PineconeConfigurationError: You haven’t specified an Api-Key.

This is the Error and i tried to change my dependency all my previous version to new but still its not working.

Kindly help me with this

Hi @krroopeshbharatwaj1 and thanks for your question!

Please have a look at our official guide for using LangChain with Pinecone.

Most of the time when users report this issue, they need to create an environment variable named PINECONE_API_KEY that contains their API key from https://app.pinecone.io.

The LangChain library wraps Pinecone’s client, so is expecting that env var by default.

Hope this helps!

Best,
Zack

Thanks a lot @ZacharyProser It worked,