oughtinc / ice

Interactive Composition Explorer: a debugger for compositional language model programs
https://ice.ought.org
MIT License
533 stars 67 forks source link

raise PydanticImportError( pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. #319

Open ttuvera1125 opened 1 year ago

ttuvera1125 commented 1 year ago

I already pip install pydantic-settings but I still get the same issue.

8igMac commented 1 year ago

Same here. I think pydantic has moved BaseSettings to a seperate package, pydantic-settings (accroding to official doc). So a migration is needed here.

Specifically, this line of code should be modified to the following:

from pydantic_settings import BaseSettings
hueykwik commented 1 year ago

I'm trying to get Hello World working, but I am stuck because I'm getting this error. Should I get the development version and then make the change @8igMac is referencing to get unstuck?

amosjyng commented 1 year ago

@hueykwik you can manually install pydantic v1 like I did to avoid the error. That is, if the packages you're using supports that

If the ICE maintainers see this: Out of curiosity as another user of Poetry, why was project setup via poetry removed here? The pydantic = "^1.9.1" line in Poetry would've prevented this problem, whereas the new setup.cfg does not declare any version constraints on pydantic. Were there major problems with using poetry?