ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

🐛 Bug: Couldn't fetch Ersilia modules with python 3.12 #995

Closed soh-123 closed 1 week ago

soh-123 commented 6 months ago

Describe the bug.

The error is: `Running command git clone --filter=blob:none --quiet https://github.com/ersilia-os/bentoml-ersilia.git /tmp/pip-req-build-xjls9x3p error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output]`

Describe the steps to reproduce the behavior

ersilia -v fetch eos3b5e

Expected behavior.

👍 Model eos3b5e fetched successfully!

Screenshots.

Screenshot 2024-03-06 at 11 00 40 AM

Operating environment

Ubuntu

Additional context

No response

HellenNamulinda commented 6 months ago

Hello @soh-123, Please note that using ersilia more successfully requires Python3.10 and not Python 3.12. To create the ersilia conda environment with Python 3.10, run the command conda create -n ersilia python=3.10

DhanshreeA commented 6 months ago

@HellenNamulinda, thanks! I asked @soh-123 to open this issue so it serves as a reminder for us to support Ersilia with Python versions above 3.11 (which is the latest version we currently support).

Ajoke23 commented 6 months ago

Describe the bug.

The error is: `Running command git clone --filter=blob:none --quiet https://github.com/ersilia-os/bentoml-ersilia.git /tmp/pip-req-build-xjls9x3p error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output]`

Describe the steps to reproduce the behavior

ersilia -v fetch eos3b5e

Expected behavior.

👍 Model eos3b5e fetched successfully!

Screenshots.

Screenshot 2024-03-06 at 11 00 40 AM

Operating environment

Ubuntu

Additional context

No response

@soh-123 Ersilia version hasn't been tested for python version above 3.12. For now, it has only been tested on python version >=3.7 and <=3.11

DhanshreeA commented 6 months ago

Another thing to note:

Refer to logs: https://github.com/ersilia-os/eos4tcc/actions/runs/8233146446/job/2251201442

      /tmp/pip-req-build-xnc6glww/versioneer.py:423: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "/usr/share/miniconda/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/share/miniconda/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/share/miniconda/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-2zuw7nxk/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-2zuw7nxk/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-2zuw7nxk/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-2zuw7nxk/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 81, in <module>
        File "/tmp/pip-req-build-xnc6glww/versioneer.py", line 1482, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/tmp/pip-req-build-xnc6glww/versioneer.py", line 1414, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-req-build-xnc6glww/versioneer.py", line 344, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]

This happens because the native module configparser does not have a class called SafeConfigParser in Python versions above 3.11. Therefore the bentoml-ersilia install breaks within an environment with Python version 3.12.

miquelduranfrigola commented 6 months ago

Thank you all - @DhanshreeA it is quite clear we have one more reason to move away from bentoml or at least from bentoml-ersilia. This won't be straightforward so let's allocate it wisely in our roadmap.

DhanshreeA commented 6 months ago

Thank you all - @DhanshreeA it is quite clear we have one more reason to move away from bentoml or at least from bentoml-ersilia. This won't be straightforward so let's allocate it wisely in our roadmap.

Technically this is a problem with versioneer.py module since it uses code incompatible with 3.12 and above, so that is ideally fixed upstream from versioneer authors (we can always monkey patch it). But yes, move away from BentoML would be nice, it's a very nice tool, just an overkill for our use case.

miquelduranfrigola commented 6 months ago

Thanks @DhanshreeA - Do you think that versioneer.py can be used as part of an independent action, instead of being embedded within the ersilia codebase?

GemmaTuron commented 1 week ago

Hi @DhanshreeA

The mentioned issue is closed, so is this now ready to be closed?

DhanshreeA commented 1 week ago

Indeed! Thanks @GemmaTuron