SCIInstitute / ShapeWorks

ShapeWorks
http://sciinstitute.github.io/ShapeWorks/
Other
103 stars 32 forks source link

cannot import name 'ModelField' from 'pydantic.fields' #2104

Closed oliverzzm closed 1 year ago

oliverzzm commented 1 year ago

Desktopinfo:

image

Steps to reproduce:

  1. install wsl
  2. In wsl, source installshapeworks.h
  3. run python script Run_usecase.py
  4. Import Error with the following error snapshot image
oliverzzm commented 1 year ago

There is no "ModelField" in the fields.py. I tried replacing with "FieldInfo" in the swcc\models\api_mode.py file, but another error occured:

image
akenmorris commented 1 year ago

It seems we have an unspecified python package version and an update broke things.

Try the following:

conda activate shapeworks
pip install typing_extensions==4.5.0
pip install pydantic==1.10.7
oliverzzm commented 1 year ago

It worked! Thank you!