# Module 'langchain.vectorstores.pinecone' has no attribute 'init'

**URL:** <https://community.pinecone.io/t/module-langchain-vectorstores-pinecone-has-no-attribute-init/1886>\
**Category:** Support\
**Created:** [May 17, 2023, 4:41am UTC](https://community.pinecone.io/t/module-langchain-vectorstores-pinecone-has-no-attribute-init/1886 "2023-05-17T04:41:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![langchain15](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@langchain15](https://community.pinecone.io/u/langchain15)\
**Post date:** [May 17, 2023, 4:41am UTC](https://community.pinecone.io/t/module-langchain-vectorstores-pinecone-has-no-attribute-init/1886/1 "2023-05-17T04:41:35Z")

</div>

Hi All,

When I attempted to install ‘pinecone’ I received the error “could not find a version that satisfies the requirement pinecone”

So instead, I installed pinecone-client

Here is my code:

from langchain.vectorstores import pinecone  
pinecone.init(api\_key=“API\_KEY”, environment=“asia-northeast1-gcp”)

I receive the following error:

File “C:\Users\Luke\PycharmProjects\Langchainv1\Langchain\_Pinecone.py”, line 2, in   
pinecone.init(api\_key=“API\_KEY”, environment=“asia-northeast1-gcp”)  
AttributeError: module ‘langchain.vectorstores.pinecone’ has no attribute ‘init’

Does this error have anything to do with the fact that I was unable to install pinecone but installed pinecone-client? That doesnt appear to be the case using Pinecones documentation: [https://docs.pinecone.io/docs/python-client](https://docs.pinecone.io/docs/python-client)

I appreciate any help. I have reinstalled pinecone-client and am a bit stumped.

---

<div class="post-metadata">

**Author:** ![jamesbriggs](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jamesbriggs/32/52_2.png) [@jamesbriggs](https://community.pinecone.io/u/jamesbriggs)\
**Post date:** [May 18, 2023, 1:21am UTC](https://community.pinecone.io/t/module-langchain-vectorstores-pinecone-has-no-attribute-init/1886/2 "2023-05-18T01:21:53Z")

</div>

Hey, `pinecone-client` is the correct install — the issue is that you’re importing pinecone via LangChain, but what you’re doing is specific to the pinecone client. To do what you’re doing here you’d do:

```python
import pinecone # this is pinecone-client package

pinecone.init(api_key='...', environment='...')

```

I’d recommend [this guide](https://github.com/pinecone-io/examples/blob/master/generation/langchain/handbook/05-langchain-retrieval-augmentation.ipynb) for using LangChain and Pinecone together, I hope that helps!
