ANTsX / ANTsPyNet

Pre-trained models and utilities for deep learning on medical images in Python
https://antspynet.readthedocs.io
Apache License 2.0
200 stars 28 forks source link

Inconsistent version number on pip + cannot import antspynet module due to `conv_utils` error #74

Closed dipterix closed 1 year ago

dipterix commented 1 year ago

Hi ANTs wizards!

I found that I cannot import antspynet due to the following error:

Error: ImportError: cannot import name 'conv_utils' from 'keras.utils'

My pip freeze shows:

Python 3.9.16
antspynet==0.2.1
keras==2.13.1rc0
...
tensorflow==2.13.0rc1
tensorflow-estimator==2.13.0rc0
tensorflow-macos==2.13.0rc1
tensorflow-probability==0.20.1

It seems that https://pypi.org/project/antspynet/ has version 0.2.1 but somehow the setup.cfg shows that version is 0.2.0 (https://github.com/ANTsX/ANTsPyNet/blob/0d687a69eed5fa7cc294a72470649f127652cf9c/setup.py#LL6C7-L6C7)

ntustison commented 1 year ago

Thanks for pointing this out. This is probably a carry over issue in migrating from keras to tensorflow.keras. Does changing setup.cfg to 0.2.1 fix the issue on your end?

dipterix commented 1 year ago

I installed from pip, which already gives me 0.2.1. I guess the version on pip is not right...

ntustison commented 1 year ago

Okay, I'll have to ask @stnava to weigh in as he's the one the put it up on PyPI.

stnava commented 1 year ago

I can update the pip version which should fix your problem.

stnava commented 1 year ago

updated - let us know

dipterix commented 1 year ago

I'm able to load the module. Thanks!