the zun cmd "python3 setup.py install" error(s)
Clark Boylan
cboylan at sapwetik.org
Mon Dec 5 18:40:19 UTC 2022
On Mon, Dec 5, 2022, at 1:49 AM, 无数的星球 wrote:
> system:ubuntu:20.04
> useDocumentation:https://docs.openstack.org/zun/zed/install/controller-install.html
>
> root at controller:/var/lib/zun/zun# python3 setup.py install
> ERROR:root:Error parsing
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/pbr/core.py", line 96, in pbr
> attrs = util.cfg_to_args(path, dist.script_args)
> File "/usr/lib/python3/dist-packages/pbr/util.py", line 271, in
> cfg_to_args
> pbr.hooks.setup_hook(config)
> File "/usr/lib/python3/dist-packages/pbr/hooks/__init__.py", line 25,
> in setup_hook
> metadata_config.run()
> File "/usr/lib/python3/dist-packages/pbr/hooks/base.py", line 27, in
> run
> self.hook()
> File "/usr/lib/python3/dist-packages/pbr/hooks/metadata.py", line 25,
> in hook
> self.config['version'] = packaging.get_version(
> File "/usr/lib/python3/dist-packages/pbr/packaging.py", line 874, in
> get_version
> raise Exception("Versioning for this project requires either an
> sdist"
> Exception: Versioning for this project requires either an sdist
> tarball, or access to an upstream git repository. It's also possible
> that there is a mismatch between the package name in setup.cfg and the
> argument given to pbr.version.VersionInfo. Project name zun was given,
> but was not able to be found.
> error in setup command: Error parsing /var/lib/zun/zun/setup.cfg:
> Exception: Versioning for this project requires either an sdist
> tarball, or access to an upstream git repository. It's also possible
> that there is a mismatch between the package name in setup.cfg and the
> argument given to pbr.version.VersionInfo. Project name zun was given,
> but was not able to be found.
> root at controller:/var/lib/zun/zun#
>
>
> cryed:
> pip3 install --upgrade distribute
> pip3 install --upgrade tensorflow_gpu
Often times this problem is caused by running setup.py outside of a git repo. As the error mentions versioning requires access to the git repository. Is /var/lib/zun/zun a git repository for zun? If not you'll either need to make it a git repo or build the sdist/wheel elsewhere in the git repo then install the resulting artifact.
More information about the openstack-discuss
mailing list