JackieHanLab / SenCID

Senescent Cell Identification
MIT License
29 stars 3 forks source link

About the required version of tensorflow #5

Open XiaoaoChen22 opened 6 months ago

XiaoaoChen22 commented 6 months ago

when my tensorflow version is 2.0.0, there would be an error: ImportError: Keras requires TensorFlow 2.2 or higher. so the requirements in frontpage should be modified.

grimwoo commented 6 months ago

Same problem. After installing the matched versions of TensorFlow and Keras by conda install tensorflow=2.1.0 keras=2.3.1, a new problem occurs:

./envs/SenCID/lib/python3.6/site-packages/absl/flags/_argument_parser.py in <module>()
     80 
     81 
---> 82 class ArgumentParser(Generic[_T], metaclass=_ArgumentParserCache):
     83   """Base class used to parse and convert arguments.
     84 

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
SherryMiyano commented 6 months ago

when my tensorflow version is 2.0.0, there would be an error: ImportError: Keras requires TensorFlow 2.2 or higher. so the requirements in frontpage should be modified.

Hi, thanks for the support of SenCID! The origin for this Error is that tensorflow and keras versions should be matched. It is always troublesome to fix this kind of bugs, and there have been many issues about this kind of conflicts (like some examples here: https://github.com/streamlit/streamlit/issues/1613#issue-642572901).

In the requirements on the frontpage, I could only describe a wide range of tensorflow and keras version (like, in your case, either upgrading tensorflow or downgrading keras would help). Therefore, I would recommend installing SenCID directly, instead of installing tensorflow or keras mannually before the installation. But you are right, I shall add a note for users to match the versions of dependencies.

Please let me know if you encounter any further problems, or you have better solution for the notation.

XiaoaoChen22 commented 6 months ago

Completely understood. Thank you so much for answering my childish questions so meticulously.

when my tensorflow version is 2.0.0, there would be an error: ImportError: Keras requires TensorFlow 2.2 or higher. so the requirements in frontpage should be modified.

Hi, thanks for the support of SenCID! The origin for this Error is that tensorflow and keras versions should be matched. It is always troublesome to fix this kind of bugs, and there have been many issues about this kind of conflicts (like some examples here: streamlit/streamlit#1613 (comment)).

In the requirements on the frontpage, I could only describe a wide range of tensorflow and keras version (like, in your case, either upgrading tensorflow or downgrading keras would help). Therefore, I would recommend installing SenCID directly, instead of installing tensorflow or keras mannually before the installation. But you are right, I shall add a note for users to match the versions of dependencies.

Please let me know if you encounter any further problems, or you have better solution for the notation.