SSL verified certificate error when "from langchain_community.llms import Ollama"

I received below error when running the code "from langchain_community.llms import Ollama" in Python in Mac.

[nltk_data] Error loading stopwords: <urlopen error [SSL:

[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed:

[nltk_data]     unable to get local issuer certificate (_ssl.c:1122)>

To resolve the issue, just running below code firstly before the import.


import nltk import ssl try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_default_https_context = _create_unverified_https_context nltk.download()




Comments

Popular posts from this blog

Top JavaScript courses helping you develop SPFx webPart with ReactJS and AngularJS

SharePoint 2013 error - "Application error when access /_vti_bin/client.svc"

How to print image to PDF using pdfmake