I am having trouble installing the AI Extension. After installing the extension, I get the following error message when restarting Knime, and the nodes are not located in my repository.
pydantic.errors.PydanticUserError: If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True. Note that @root_validator is deprecated and should be replaced with @model_validator.
Hello @cohord,
sorry for your troubles.
The error you see is confusing because it was introduced in pydantic 2.x but the AI Extension is using pydantic 1.10.13.
Would you be able to share the installation log of the AI Extension so we can better understand what happened during the installation?
On Windows you can find it under <knime installation directory>\plugins\org.knime.python.llm.channel.bin.win32.x86_64_5.3.2.v202408261553\bin\create_env.out
On other systems the folder will also have the prefix org.knime.python.llm.channel.bin. followed by a platform specific suffix.
Hello @cohord,
thank you for providing the logs, they were very helpful.
It looks like pip is pulling in a newer version of pydantic from your user-level site-packages even though there is already a sufficient version of pydantic installed in the environment. We are still figuring out how we can prevent this from happening in general but there might exist a workaround you could try:
Uninstall the AI Extension via Help → About KNIME Analytics Platform → Installation Details
Close KNIME and start it with the environment variable PYTHONNOUSERSITE set to 1. This should prevent pip from pulling in the user-level package.
Restart KNIME after the installation
After the installation is completed, the environment variable should no longer be necessary.
Please let us know if that works as this could inform potential solutions we can build into the installation.
Thank you and sorry for the inconvenience.
Best regards,
Adrian