Problem

Pinecone has no attribute 'from_texts' errors occur when using an outdated version of LangChain. Previously, the Python classes for both LangChain and Pinecone had objects named Pinecone, but this is no longer an issue in the latest LangChain version.

Solution

To fix this, upgrade LangChain to >=0.0.3:

pip install --upgrade langchain-pinecone

You can find more information about using LangChain with Pinecone in our documentation.