python设置.py此项目的sidst错误版本控制需要sdist tarball或访问上游git存储库

2024-06-16 10:30:27 发布

您现在位置:Python中文网/ 问答频道 /正文

github下载的tosca解析器在使用python setup.py develop时会抱怨:此项目的版本控制需要sdist tarball或访问上游git存储库。所以我使用python setup.py sdist,错误是一样的:

ERROR:root:Error parsing
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pbr/core.py", line 96, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/usr/lib/python2.7/site-packages/pbr/util.py", line 270, in cfg_to_args
    pbr.hooks.setup_hook(config)
  File "/usr/lib/python2.7/site-packages/pbr/hooks/__init__.py", line 25, in setup_hook
    metadata_config.run()
  File "/usr/lib/python2.7/site-packages/pbr/hooks/base.py", line 27, in run
    self.hook()
  File "/usr/lib/python2.7/site-packages/pbr/hooks/metadata.py", line 26, in hook
    self.config['name'], self.config.get('version', None))
  File "/usr/lib/python2.7/site-packages/pbr/packaging.py", line 874, in get_version
    name=package_name))
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 tosca-parser was given, but was not able to be found.
error in setup command: Error parsing /home/tiina/tosca/tosca-parser-master/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 tosca-parser was given, but was not able to be found.

{cd3>在这个命令之后,同样的错误消失了。我不明白的是,它从何处需要一个上游git存储库?


Tags: tonameinpylibpackagesusrsetup