cellmodeller / CellModeller

GPU-accelerated multicellular modelling framework
http://cellmodeller.github.io/CellModeller/
Other
56 stars 48 forks source link

pip fails to install cellmodeller - "metadata-generation-failed" #48

Closed WilliamPJSmith closed 7 months ago

WilliamPJSmith commented 7 months ago

I've been trying to install CellModeller (Master branch) on a new computer, exactly following the installation guide within the wiki: https://github.com/cellmodeller/CellModeller/wiki/Installation.

The final command, $ pip install -e . fails with the following error message:

Obtaining file:///Users/student/CellModeller
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [72 lines of output]
      /Users/student/miniconda3/lib/python3.11/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      /Users/student/miniconda3/lib/python3.11/site-packages/setuptools/dist.py:315: SetuptoolsDeprecationWarning: Invalid version: "b'v4.3-42-g96ab099'".
      !!

              ********************************************************************************
              The version specified is not a valid version according to PEP 440.
              This may not work as expected with newer versions of
              setuptools, pip, and PyPI.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.

              See https://peps.python.org/pep-0440/ for details.
              ********************************************************************************

      !!
        self._validate_version(self.metadata.version)
      running egg_info
      /Users/student/miniconda3/lib/python3.11/site-packages/setuptools/command/egg_info.py:130: SetuptoolsDeprecationWarning: Invalid version: "b'v4.3-42-g96ab099'".
      !!

              ********************************************************************************
              Version "b'v4.3-42-g96ab099'" is not valid according to PEP 440.

              Please make sure to specify a valid version for your package.
              Also note that future releases of setuptools may halt the build process
              if an invalid version is given.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.

              See https://peps.python.org/pep-0440/ for details.
              ********************************************************************************

      !!
        return _normalization.best_effort_version(tagged)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/Users/student/CellModeller/setup.py", line 24, in <module>
          setup(name='CellModeller',
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 224, in finalize_options
          parsed_version = packaging.version.Version(self.egg_version)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/student/miniconda3/lib/python3.11/site-packages/setuptools/_vendor/packaging/version.py", line 198, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'b-v4.3-42-g96ab099-'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I am using pip 23.3.1 (python 3.11). Is the problem an incompatibility between this pip version and the current setup.py?

avimanyu786 commented 7 months ago

Hi @WilliamPJSmith , I have recently tested the fix and sent the PR #49 . Could you please try the new setup.py on the pull request? If it also works for you, then I will try to finally merge it. Thanks.

WilliamPJSmith commented 7 months ago

Hi @avimanyu786 - I just tried the new setup.py, installation worked fine! Many thanks for your help. W

avimanyu786 commented 7 months ago

Hi @avimanyu786 - I just tried the new setup.py, installation worked fine! Many thanks for your help. W

Thanks for confirming @WilliamPJSmith ! That's really good to know.