askap-vast / vast-tools

A collection of tools that are useful for the VAST project and for exploration of results from the VAST Pipeline.
https://vast-survey.org/vast-tools/
MIT License
8 stars 0 forks source link

Poetry installation fails on clean 3.10.12 environment (astropy & pyarrow) #498

Closed ajstewart closed 3 months ago

ajstewart commented 1 year ago

Attempted to install to clean python 3.10.12 environment (Intel Mac).

May need to start looking at something like #334.

  • Installing astropy (4.3.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  Traceback (most recent call last):
    File "/Users/adam/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/adam/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/adam/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
      self.run_setup()
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 70, in <module>
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/extension_helpers/_setup_helpers.py", line 67, in get_extensions
      ext_modules.extend(setuppkg.get_extensions())
    File "./astropy/modeling/setup_package.py", line 59, in get_extensions
      from jinja2 import Environment, FileSystemLoader
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/jinja2/__init__.py", line 33, in <module>
      from jinja2.environment import Environment, Template
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/jinja2/environment.py", line 15, in <module>
      from jinja2 import nodes
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/jinja2/nodes.py", line 19, in <module>
      from jinja2.utils import Markup
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/jinja2/utils.py", line 642, in <module>
      from markupsafe import Markup, escape, soft_unicode
  ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmpkgsqh09m/.venv/lib/python3.10/site-packages/markupsafe/__init__.py)

  at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare
      143│
      144│                 error = ChefBuildError("\n\n".join(message_parts))
      145│
      146│             if error is not None:
    → 147│                 raise error from None
      148│
      149│             return path
      150│
      151│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with astropy (4.3.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "astropy (==4.3.1)"'.

and

  • Installing pyarrow (3.0.0): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  <string>:30: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  ERROR setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
  Traceback (most recent call last):
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject
      section = defn.get("tool", {})[tool_name]
  KeyError: 'setuptools_scm'

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
      config = _config.Configuration.from_file(dist_name=dist_name)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_config.py", line 128, in from_file
      pyproject_data = _read_pyproject(name, _load_toml=_load_toml)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 55, in read_pyproject
      raise LookupError(f"{name} does not contain a tool.{tool_name} section") from e
  LookupError: pyproject.toml does not contain a tool.setuptools_scm section
  Traceback (most recent call last):
    File "/Users/adam/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/adam/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/adam/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 434, in build_wheel
      return self._build_with_temp_dir(
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
      self.run_setup()
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 581, in <module>
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
      _setup_distribution = dist = klass(attrs)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 303, in __init__
      _Distribution.__init__(self, dist_attrs)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
      self.finalize_options()
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 680, in finalize_options
      ep(self)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
      ep.load()(self, ep.name, value)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
      _assign_version(dist, config)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
      maybe_version = _get_version(config, force_write_version_files=True)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 102, in _get_version
      write_version_files(config, version=version_string, scm_version=parsed_version)
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
      dump_version(
    File "/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp7n2fd2et/.venv/lib/python3.10/site-packages/setuptools_scm/_integration/dump_version.py", line 40, in dump_version
      assert not write_to.is_absolute(), f"{write_to=}"
  AssertionError: write_to=PosixPath('/private/var/folders/gz/3f0ppq056jj8cdvt5jr8xhfm0000gn/T/tmp8srmmhtg/pyarrow-3.0.0/pyarrow/_generated_version.py')

  at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare
      143│
      144│                 error = ChefBuildError("\n\n".join(message_parts))
      145│
      146│             if error is not None:
    → 147│                 raise error from None
      148│
      149│             return path
      150│
      151│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pyarrow (3.0.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "pyarrow (==3.0.0)"'.
ajstewart commented 1 year ago

Ah I see Python 3.10 is not actually tested against yet, got confused with the pipeline. I'll leave this up regardless as it would be good to support 3.10 and 3.11 (#467).