Installing langchain-visualizer with Pip was not enough for the library to install successfully on my system.
When attempting to import, it would fail on the following command, invoked by the ice library
from yaml import CLoader
No CLoader existed in that environment.
Environment
My project uses a Jupyter server running inside a Docker container, based on an Ubuntu 22 Jammy image. I've been installing the python libs with a requirements.txt passed to pip inside the Dockerfile.
Manual Solution
Here is what worked for me.
Invoke apt in the Dockerfile to install libyaml-dev
RUN apt update && apt install -y libyaml-dev
Add the following two lines to requirements.txt (passed to pip with -r):
Thanks for letting me know! I've created https://github.com/oughtinc/ice/pull/307 to remove this dependency upstream, and merged #64 to document this in the meantime
Bug
Installing
langchain-visualizer
with Pip was not enough for the library to install successfully on my system.When attempting to import, it would fail on the following command, invoked by the
ice
libraryNo CLoader existed in that environment.
Environment
My project uses a Jupyter server running inside a Docker container, based on an Ubuntu 22 Jammy image. I've been installing the python libs with a
requirements.txt
passed topip
inside theDockerfile
.Manual Solution
Here is what worked for me.
At a minimum, this should be documented in the README.md.
Informative Error Message
The import statement could catch the import error and more helpfully inform the user that
libyaml-dev
is required.Automatic Solution
Is there a way to require C/C++ libs in Python's package managers? I have no idea.