Repository: stanford-crfm/helm
Issue: Summarization dependencies can't be installed successfully
Root cause: External Dependency Breakage

When creating a fresh crfm-helm and installing helm with summarization dependencies, the installation fails.

## Error

```
Building wheels for collected packages: pyemd, moverscore, typing
  DEPRECATION: Building 'pyemd' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'pyemd'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for pyemd (setup.py): started
  Building wheel for pyemd (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      /opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py:94: _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)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 35, in <module>
        File "/private/var/folders/jp/0btxf_tn5mjd0481bq7bbm_m6r1gbn/T/pip-install-pl_9a2ix/pyemd_c711fd841ff748d8996a1e060d6d501b/setup.py", line 99, in <module>
          setup(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py", line 116, in setup
          _install_setup_requires(attrs)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py", line 89, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py", line 94, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/dist.py", line 768, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/installer.py", line 44, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 893, in resolve
          dist = self._resolve_dist(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 929, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1267, in best_match
          return self.obtain(req, installer)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1303, in obtain
          return installer(requirement) if installer else None
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/installer.py", line 112, in _fetch_build_egg_no_warn
          wheel.install_as_egg(dist_location)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/wheel.py", line 122, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/wheel.py", line 130, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/wheel.py", line 175, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/jp/0btxf_tn5mjd0481bq7bbm_m6r1gbn/T/pip-install-pl_9a2ix/pyemd_c711fd841ff748d8996a1e060d6d501b/.eggs/numpy-1.26.4-py3.10-macosx-11.1-arm64.egg/numpy-1.26.4.dist-info' -> '/private/var/folders/jp/0btxf_tn5mjd0481bq7bbm_m6r1gbn/T/pip-install-pl_9a2ix/pyemd_c711fd841ff748d8996a1e060d6d501b/.eggs/numpy-1.26.4-py3.10-macosx-11.1-arm64.egg/EGG-INFO'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyemd
  Running setup.py clean for pyemd
  error: subprocess-exited-with-error
  
  × python setup.py clean did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      /opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py:94: _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)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 35, in <module>
        File "/private/var/folders/jp/0btxf_tn5mjd0481bq7bbm_m6r1gbn/T/pip-install-pl_9a2ix/pyemd_c711fd841ff748d8996a1e060d6d501b/setup.py", line 99, in <module>
          setup(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py", line 116, in setup
          _install_setup_requires(attrs)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py", line 89, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/__init__.py", line 94, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/dist.py", line 768, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/installer.py", line 44, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 893, in resolve
          dist = self._resolve_dist(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 929, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1267, in best_match
          return self.obtain(req, installer)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1303, in obtain
          return installer(requirement) if installer else None
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/installer.py", line 112, in _fetch_build_egg_no_warn
          wheel.install_as_egg(dist_location)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/wheel.py", line 122, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/wheel.py", line 130, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/opt/miniconda3/envs/crfm-helm/lib/python3.10/site-packages/setuptools/wheel.py", line 175, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/jp/0btxf_tn5mjd0481bq7bbm_m6r1gbn/T/pip-install-pl_9a2ix/pyemd_c711fd841ff748d8996a1e060d6d501b/.eggs/numpy-1.26.4-py3.10-macosx-11.1-arm64.egg/numpy-1.26.4.dist-info' -> '/private/var/folders/jp/0btxf_tn5mjd0481bq7bbm_m6r1gbn/T/pip-install-pl_9a2ix/pyemd_c711fd841ff748d8996a1e060d6d501b/.eggs/numpy-1.26.4-py3.10-macosx-11.1-arm64.egg/EGG-INFO'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed cleaning build dir for pyemd
  DEPRECATION: Building 'moverscore' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'moverscore'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for moverscore (setup.py): started
  Building wheel for moverscore (setup.py): finished with status 'done'
  Created wheel for moverscore: filename=moverscore-1.0.3-py3-none-any.whl size=8012 sha256=cdc543b691504a2561004f4c49f842283bf8dd6c81f6c9837ed0941debae5e78
  Stored in directory: /Users/s0400266/Library/Caches/pip/wheels/ae/b5/15/116944664c4dc1bc5316f63395d0ca11d325364b44112eb381
  DEPRECATION: Building 'typing' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'typing'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for typing (setup.py): started
  Building wheel for typing (setup.py): finished with status 'done'
  Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=26396 sha256=d1a4868efd031e9eb997de9e6ab1bcab8dfd117603d33ac2b120e07376c0bd2f
  Stored in directory: /Users/s0400266/Library/Caches/pip/wheels/7c/d0/9e/1f26ebb66d9e1732e4098bc5a6c2d91f6c9a529838f0284890
Successfully built moverscore typing
Failed to build pyemd
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyemd)

```

## Logs

[create_venv.log](https://github.com/user-attachments/files/21801133/create_venv.log) (Successful)
[install_helm.log](https://github.com/user-attachments/files/21801120/install_helm.log) (Successful)
[install_helm_summarization.log](https://github.com/user-attachments/files/21801121/install_helm_summarization.log) (Failures occur)


Debugged offline - the issue is that pyemd requires a recent version of setuptools to build. This is not related to the bert-score package.

This can be resolved with:
`pip install -U setuptools`