Import Error with longchain package

Hi!!

I have an issue with the deployment of my app. Once Render has completed the build process and the web service is alive I get the following error message:

ImportError: cannot import name ‘RecursiveCharacterTextSplitter’ from ‘langchain.text_splitter’ (/opt/render/project/src/.venv/lib/python3.7/site-packages/langchain/text_splitter.py)

However, in my local machine, in development enviorment everything is ok.

I really appreciate your help, folks!

LangChain only supports Python 3.8.1+ https://github.com/langchain-ai/langchain/blob/master/pyproject.toml, I’d try updating your python version and go from there.

Thanks for your help Chris. I´m working with Python 3.11.3

This shows you are using 3.7 here though so you probably need to set your PYTHON_VERSION env variable to 3.11.3

Hi Oscar,

Did Chris’ suggestion resolve the issue?

Chris: Thanks for the excellent suggestion!

Regards,
Mike


Render Support Engineer, MT (UTC-7)

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