pybids icon indicating copy to clipboard operation
pybids copied to clipboard

pip configparser error on osx

Open adelavega opened this issue 3 years ago • 5 comments

  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      AssertionError:
      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
        File "/opt/homebrew/lib/python3.10/site-packages/setuptools/build_meta.py", line 445, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
        File "/opt/homebrew/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/opt/homebrew/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/opt/homebrew/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
        File "<string>", line 1800, in get_version
        File "<string>", line 1732, in get_versions
        File "<string>", line 396, in get_config_from_root
        File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/configparser.py", line 782, in get
          d = self._unify_values(section, vars)
        File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/configparser.py", line 1153, in _unify_values
          raise NoSectionError(section) from None
      configparser.NoSectionError: No section: 'versioneer'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

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

Issue reported by @nicoalee when trying to pip install from source on mac os x.

This was caused by #907 it looks like @effigies

adelavega avatar Nov 23 '22 21:11 adelavega

Is this old pip? Need tomli installed, but that should be part of the build requirements.

effigies avatar Nov 23 '22 22:11 effigies

This was on pip 22.3.1 it looks like

adelavega avatar Nov 23 '22 22:11 adelavega

My guess was that it had to do w/ absolute vs relative paths, such as bids/_version.py, but my attempts to fix that didn't work.

adelavega avatar Nov 23 '22 22:11 adelavega

I guess we can revert to a setup.cfg-based configuration. I don't understand why this would be an issue on OSX in particular, but I can't reproduce the issue on a Linux machine.

What version of setuptools is installed? The error seems to be starting there, with it calling setup() when pip is checking for Getting requirements to build editable.

effigies avatar Nov 27 '22 02:11 effigies

@nicoalee can you report which version of setuptools you had in this environment?

I can try to reproduce on a fresh macbook to see if this is a common problem, if I can borrow a mac.

adelavega avatar Dec 03 '22 00:12 adelavega