Yeonghun1675 / ChatMOF

Predict and Inverse design for metal-organic framework with large-language models (llms)
https://www.nature.com/articles/s41467-024-48998-4
MIT License
50 stars 6 forks source link

ImportError on Running chatmof setup After Installation #12

Closed Andy6M closed 7 months ago

Andy6M commented 8 months ago

Dear Yeonghun: After successfully installing chatmof using pip, running the chatmof setup command results in an ImportError.

To Reproduce Steps to reproduce the behavior:

Install chatmof with pip install chatmof. Run chatmof setup. See error: Traceback (most recent call last): File "/root/miniconda3/envs/chatmof/bin/chatmof", line 5, in <module> from chatmof.cli.main import main ... File "/root/miniconda3/envs/chatmof/lib/python3.9/site-packages/langchain/tools/python/__init__.py", line 13, in <module> raise_on_import() File "/root/miniconda3/envs/chatmof/lib/python3.9/site-packages/langchain/tools/python/__init__.py", line 3, in raise_on_import raise ImportError( ImportError: This tool has been moved to langchain experiment. This tool has access to a python REPL. For best practices make sure to sandbox this tool. Read https://github.com/langchain-ai/langchain/blob/master/SECURITY.md To keep using this code as is, install langchain experimental and update relevant imports replacing 'langchain' with 'langchain_experimental'

My python version is 3.9.

Thanks!

Yeonghun1675 commented 8 months ago

Hi @Andy6M,

Thank you for your interest in our research. We've checked and found that the location of the python REPL tool changed when langchain was updated. If you install langchain to version 0.0.235, you should be able to use it.

$ pip install langchain==0.0.235

We'll update the requirement as well.