Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install pyarrow==11.0.0 --no-binary pyarrow fails #925

Closed
markusbahn opened this issue Sep 21, 2023 · 4 comments · Fixed by #935
Closed

Install pyarrow==11.0.0 --no-binary pyarrow fails #925

markusbahn opened this issue Sep 21, 2023 · 4 comments · Fixed by #935

Comments

@markusbahn
Copy link

Hi,

I tried to download the pyarrow package:

pip download pyarrow==11.0.0 --no-binary pyarrow --no-deps

Since version 8.0.0 (still with 8.0.2) I receive the following error:

ERROR setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section Traceback (most recent call last): File "/tmp/pip-build-env-x08ogq7b/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject section = defn.get("tool", {})[tool_name] KeyError: 'setuptools_scm'

The problem does not occur if I force pyarrow to use version 7.1.0.

@RonnyPfannschmidt
Copy link
Contributor

seems this is a issue with plain setuptools vs modern setuptools, preparing a propper bugfix after i finish the hook order

@RonnyPfannschmidt
Copy link
Contributor

so, is there only the log message or a actual problem

@markusbahn
Copy link
Author

There is actually a problem. It is currently not possible to install pyarrow via:

pip download pyarrow==11.0.0 --no-binary pyarrow

Here is a full log:

Collecting pyarrow==11.0.0
  Using cached pyarrow-11.0.0.tar.gz (1.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      <string>:34: 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 "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/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 "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
          config = _config.Configuration.from_file(dist_name=dist_name)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools_scm/_config.py", line 128, in from_file
          pyproject_data = _read_pyproject(name, _load_toml=_load_toml)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/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 "/home/mzinser/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/mzinser/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/mzinser/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 498, in <module>
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 303, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 680, in finalize_options
          ep(self)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
          _assign_version(dist, config)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
          maybe_version = _get_version(config, force_write_version_files=True)
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/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 "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
          dump_version(
        File "/tmp/pip-build-env-l48rpe9z/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/dump_version.py", line 38, in dump_version
          assert not write_to.is_absolute(), f"{write_to=}"
      AssertionError: write_to=PosixPath('/tmp/pip-download-wd98cocp/pyarrow_49feee39c02c4bb9bc67d34ef4abf380/pyarrow/_generated_version.py')
      [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.

@RonnyPfannschmidt
Copy link
Contributor

now that is showing the real error, which is something i can bugfix sanely (FTR pyarrow has a very messy project config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants