!!开发堆栈!! setup.py 运行到 pbr 时遇到错误

问题描述

所以我正在尝试安装 devstach 我按照此处的说明进行操作

https://docs.openstack.org/sahara/pike/contributor/devstack.html

这是我下载的 devstack

git clone https://git.openstack.org/openstack-dev/devstack.git

这是我的 local.conf

[[local|localrc]]
ADMIN_PASSWORD=nova
MysqL_PASSWORD=nova
RABBIT_PASSWORD=nova
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=nova

# Enable Swift
enable_service s-proxy s-object s-container s-account

SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_data_dir=$DEST/data

# Force checkout prerequisites
# FORCE_PREREQ=1

# keystone is Now configured by default to use PKI as the token format
# which produces huge tokens.
# set UUID as keystone token format which is much shorter and easier to
# work with.
KEYSTONE_TOKEN_FORMAT=UUID

# Change the FLOATING_RANGE to whatever IPs VM is working in.
# In NAT mode it is the subnet VMware Fusion provides,in bridged mode
# it is your local network. But only use the top end of the network by
# using a /27 and starting at the 224 octet.
FLOATING_RANGE=192.168.55.224/27

# Enable logging
SCREEN_LOGDIR=$DEST/logs/screen

# Set ``OFFLINE`` to ``True`` to configure ``stack.sh`` to run cleanly
# without Internet access. ``stack.sh`` must have been prevIoUsly run
# with Internet access to install prerequisites and fetch repositories.
# OFFLINE=True

# Enable sahara
enable_plugin sahara https://git.openstack.org/openstack/sahara

# Enable heat
enable_plugin heat https://git.openstack.org/openstack/heat

# Setting this machine private IP address
HOST_IP="192.168.1.130"

但主要问题是在我运行 stack.sh 并下载一些 git 文件(如 saharaheat)之后会出现这个错误,具体来说就是这里的错误

ERROR: Command errored out with exit status 1:                                                        
     command: /usr/bin/python3.8 -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/opt/stack/neutron/setup.py'"'"'; __file__='"'"'/opt/stack/neutron/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)
(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info
         cwd: /opt/stack/neutron/                                                                         
    Complete output (24 lines):                  
    /usr/local/lib/python3.8/dist-packages/setuptools/dist.py:634: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_fil
e' instead                             
      warnings.warn(     
    /usr/local/lib/python3.8/dist-packages/setuptools/dist.py:634: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' inste
ad
      warnings.warn(
    /usr/local/lib/python3.8/dist-packages/setuptools/dist.py:634: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
      warnings.warn(
    /usr/local/lib/python3.8/dist-packages/setuptools/dist.py:634: UserWarning: Usage of dash-separated 'python-requires' will not be supported in future versions. Please use the underscore name 'python_requires'
 instead
      warnings.warn(
    ERROR:root:Error parsing
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/pbr/core.py",line 96,in pbr
        attrs = util.cfg_to_args(path,dist.script_args)
      File "/usr/local/lib/python3.8/dist-packages/pbr/util.py",line 271,in cfg_to_args
        pbr.hooks.setup_hook(config)
      File "/usr/local/lib/python3.8/dist-packages/pbr/hooks/__init__.py",line 25,in setup_hook
        Metadata_config.run()
      File "/usr/local/lib/python3.8/dist-packages/pbr/hooks/base.py",line 27,in run
        self.hook()
      File "/usr/local/lib/python3.8/dist-packages/pbr/hooks/Metadata.py",in hook
        self.config['version'] = packaging.get_version(
      File "/usr/local/lib/python3.8/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 argu
ment given to pbr.version.VersionInfo. Project name neutron was given,but was not able to be found.
    error in setup command: Error parsing /opt/stack/neutron/setup.cfg: Exception: Versioning for this project requires either an sdist tarball,or access to an upstream git repository. It's also possible that th
ere is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name neutron was given,but was not able to be found.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我检查了我应该检查并理解检查的所有地方。但我认为主要问题与 pbr 以及它与 nutron 或其他东西的版本有关。

我对此完全陌生,所以抱歉没有以更好的方式提出这个问题

我正在 ubuntu 服务器 20.04 vm 上安装 devstack

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)