I have run into a problem that the command astrometadata no longer works on my system.
When I tried
pip install -e ~/programs/astro_metadata_translator-main
I get the below error message:
Obtaining file:///home/plah/programs/astro_metadata_translator-main
Installing build dependencies … done
Checking if build backend supports build_editable … done
Getting requirements to build editable … done
Installing backend dependencies … done
Preparing editable metadata (pyproject.toml) … error
error: subprocess-exited-with-error
× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
Popen([‘git’, ‘version’], cwd=/home/plah/programs/astro_metadata_translator-main, universal_newlines=False, shell=None, istream=None)
Popen([‘git’, ‘version’], cwd=/home/plah/programs/astro_metadata_translator-main, universal_newlines=False, shell=None, istream=None)
Failed checking if running in CYGWIN due to: FileNotFoundError(2, ‘No such file or directory’)
Traceback (most recent call last):
File “/home/plah/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 351, in
main()
File “/home/plah/.local/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 “/home/plah/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 179, in prepare_metadata_for_build_editable
return hook(metadata_directory, config_settings)
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 451, in prepare_metadata_for_build_editable
return self.prepare_metadata_for_build_wheel(
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 377, in prepare_metadata_for_build_wheel
self.run_setup()
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 335, in run_setup
exec(code, locals())
File “”, line 1, in
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/init.py”, line 87, in setup
return distutils.core.setup(**attrs)
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py”, line 147, in setup
_setup_distribution = dist = klass(attrs)
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/dist.py”, line 475, in init
_Distribution.init(
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py”, line 283, in init
self.finalize_options()
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/setuptools/dist.py”, line 899, in finalize_options
ep(self)
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/lsst_versions/_versions.py”, line 454, in infer_version_for_setuptools
version, written = _process_version_writing(".", True, fallback=True)
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/lsst_versions/_versions.py”, line 391, in _process_version_writing
version = get_lsst_version(dirname, fallback)
File “/tmp/pip-build-env-4h35ahfw/overlay/lib/python3.10/site-packages/lsst_versions/_versions.py”, line 427, in get_lsst_version
raise RuntimeError(f"Unable to find a version from Git or metadata within directory {dirname}")
RuntimeError: Unable to find a version from Git or metadata within directory .
[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.
When I tried
setup -k -r ~/programs/astro_metadata_translator-main
this runs without output so I can only presume it works.
However as I mentioned astrometadata no longer works. I tried uninstalling it and installing it again using pip but it still wouldn’t work. This has left me baffled. Do you have any ideas on how I can proceed?